【单选题】下列关于如下这段代码的说法中正确的是( )。 public class test { public static void throwit() { throw new RuntimeException(); } public static void main(String args[]) { try{ System.out.println(“你好吗”); throwit(); System.out...
【单选题】下列关于如下这段代码的说法中正确的是( )。 public class test { public static void throwit() { throw new RuntimeException() } public static void main(String args[]) { try{ System.out.println('你好吗') throwit() System.out.pr...
【简答题】public class Something { public static void main(String[] args) { Other o = new Other() new Something().addOne(o) } public void addOne(final Other o) { o.i++ } } class Other { public int i } 和上面的很相似,都...
【单选题】已知有如下定义: //Runnable.java public interface Runnable{ public static void run(){ System.out.println("Running"); } } //Animal.java public class Animal implements Runnable{ public void run(){ System.out.pr...
【单选题】已知有如下代码,关于代码的描述正确的是: class A{ static int a=23; int b=34; public void tst(){ a++; } public static void operate(){ b++; } public static void main(String... args){ System.out.println(a); System.out.print...