can u share how exactly u solved it!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
..
..
.
.
ORDER IS NOT CORRECT
package com.codegym.task.task03.task0315;
/*
Roy G. Biv…
*/
public class Solution {
public static void main(String[] args) {
Red red = new Solution.Red();
Orange orange = new Solution.Orange();
Yellow yellow = new Solution.Yellow();
Green green = new Solution.Green();
Blue blue = new Solution.Blue();
Indigo indigo = new Solution.Indigo();
Violet violet = new Solution.Violet();
/*Solution.Red d = new Solution.Red();
Solution.Orange e = new Solution.Orange();
Solution.Yellow w = new Solution.Yellow();
Solution.Green n = new Solution.Green();
Solution.Blue ee = new Solution.Blue();
Solution.Indigo o = new Solution.Indigo();
Solution.Violet t = new Solution.Violet();
*/
/* Solution.Violet t = new Solution.Violet();
Solution.Indigo o = new Solution.Indigo();
Solution.Blue ee = new Solution.Blue();
Solution.Green n = new Solution.Green();
Solution.Yellow w = new Solution.Yellow();
Solution.Orange e = new Solution.Orange();
Solution.Red d = new Solution.Red();
*/ //reverse isnt working either... //write your code here
}
public static class Red {
public Red() {
System.out.println("Red");
}
}
public static class Orange {
public Orange() {
System.out.println("Orange");
}
}
public static class Yellow {
public Yellow() {
System.out.println("Yellow");
}
}
public static class Green {
public Green() {
System.out.println("Green");
}
}
public static class Blue {
public Blue() {
System.out.println("Blue");
}
}
public static class Indigo {
public Indigo() {
System.out.println("Indigo");
}
}
public static class Violet {
public Violet() {
System.out.println("Violet");
}
}
}