📄 testmembervariable_1.java
字号:
package variable;
public class TestMemberVariable_1 {
int age;
char sex;
double score;
boolean married;
public static void main(String[] args) {
TestMemberVariable_1 obj=new TestMemberVariable_1();
System.out.println("Your age is "+obj.age);
System.out.println("Your sex is "+obj.sex);
System.out.println("Your score is "+obj.score);
System.out.println("Are you married? "+obj.married);
System.out.println("=================");
System.out.println("Your age is "+new TestMemberVariable_1().age);
System.out.println("Your sex is "+new TestMemberVariable_1().sex);
System.out.println("Your score is "+new TestMemberVariable_1().score);
System.out.println("Are you married? "+new TestMemberVariable_1().married);
System.out.println("=================");
System.out.println(Math.ceil(4.56));
System.out.println(Math.ceil(-4.56));
System.out.println(Math.floor(4.345));
System.out.println(Math.floor(-4.345));
System.out.println(Math.round(4.345));
System.out.println(Math.round(-4.345));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -