Home Article Practice ClassObject Field.java80p10_20

ClassObject Field.java80p10_20

2024-10-20 13:12  views:91  source:叶问    

package cc.openhome;
class Clothes{
String color;
char size;
}
public class Field{
publics static void main(String[] args){
Clothes sun = new Clothes();
Clothes spriting = new Clothers();
sun.color = "red";
sun.size = 's';
spring.color = "green";
spring.size = 'M';
System.out.printf("sun ( %s, %c) %n", sun.color, sun.size);
System.out.printf("spring ( %s , %s)%n", spring.color, spring.size);
}
}



Disclaimer: The above articles are added by users themselves and are only for typing and communication purposes. They do not represent the views of this website, and this website does not assume any legal responsibility. This statement is hereby made! If there is any infringement of your rights, please contact us promptly to delete it.

字符:    改为:
去打字就可以设置个性皮肤啦!(O ^ ~ ^ O)