/*
七色彩虹...
*/
public class Solution {
public static void main(String[] args) {
//write your code here
Red red=new Red();
Orange orange=new Orange();
Yellow yellow=new Yellow();
Green green=new Green();
Blue blue=new Blue();
Indigo indigo=new Indigo();
Violet violet=new Violet();
}
public static class Red {
public Red() {
System.out.println("红色");
}
}
public static class Orange {
public Orange() {
System.out.println("橙色");
}
}
public static class Yellow {
public Yellow() {
System.out.println("黄色");
}
}
public static class Green {
public Green() {
System.out.println("绿色");
}
}
public static class Blue {
public Blue() {
System.out.println("蓝色");
}
}
public static class Indigo {
public Indigo() {
System.out.println("靛色");
}
}
public static class Violet {
public Violet() {
System.out.println("紫色");
}
}
}
无相孤君
第 4 级
[答案]七色彩虹
正在讨论
评论 (2)
- 受欢迎
- 新
- 旧
你必须先登录才能发表评论
李春雨 王
14 二月 2020, 05:02
new Red();
0
Guadalupe Gagnon
23 十二月 2019, 19:12
cant help you if you do not share the solution
0