public class Test{ public static void main(String[] args){ System.out.println(5/2); } }
举一反三
- 下列程序的运行结果是()public class Test {public static void main(String[] args) {String str = NULL;System.out.println(str);}} A:
- public class Test { public static void main(String[] args) { String s1 = "abc"; String s2 = new String ("abc"); System.out.println(s1 == s2); } } 程序运行结果是
- 下列代码的执行结果是 Public class Test { Public static void main(String args[]) { System.out.println(5/2); } }
- 分析程序,将代码补充完整public class Test { ________ __ int k=5; public static void main(String[] args){ Test t1=new Test(); t1.k++; System.out.println(Test.k); }}
- 中国大学MOOC: 下列代码中构造方法的返回类型是()public class Village { Village () { System .out .println(“hiding in Village”) ; } public static void main( String args [ ]) { Village c =new Village ( ) ;}class Village { public static void main( String args [ ]) { Village c =new Village ( ) ; } Village () { System .out .println(“hiding in Village”) ; } }