test2.11

来源:互联网 发布:在线网络课程 编辑:程序博客网 时间:2024/06/05 06:30
/*target:excise the style of class name and identifier name
 * methods:use this long rainbow example
 */


public class Test11 {
public static void main(String[] args) {
class AllTheColorsOfTheRainBow{
int anIntegerRepresentingColor=23;
void changeOfHueOfTheColors()
{
anIntegerRepresentingColor++;
}
}
AllTheColorsOfTheRainBow rain=new AllTheColorsOfTheRainBow();
System.out.println(rain.anIntegerRepresentingColor);
rain.changeOfHueOfTheColors();
System.out.println(rain.anIntegerRepresentingColor);
}
}
0 0
原创粉丝点击