下列哪个类的声明是正确的?( )
A: public static class Hello
B: public final abstract Hello
C: class Hello
D: public Hello
A: public static class Hello
B: public final abstract Hello
C: class Hello
D: public Hello
举一反三
- 下列代码执行结果是?( ) class HelloWorld { public static void modifyString(final String str) { str = "Hello World!"; } public static void main(String[] args) { String a = new String("Hello Java"); modifyString(a); System.out.println(“a = ” + a); } } A: a = Hello Java B: a = Hello World C: 代码编译错误 D: 运行时异常
- class Test { public static void main(String[] args) { StringBuffer sb = new StringBuffer("hello world"); sb.delete(6,sb.length()); System.out.println( sb.toString() ); } } A: Hello w B: Hello C: Hello worl
- 下列哪个类声明是正确的 ( ) A: abstract class G2 extends superClass1,superClass2{...} B: abstract public class classmates{...} C: public final class NewClass extends superClass implemnets Interface1{...} D: public abstract class String{...}
- 下列哪个类声明是正确的 ( ) A: A) abstract class G2 extends superClass1, superClass2 … B: B) abstract public class classmates… C: C) public final class NewClass extends superClass implemnets Interfacel… D: D) public abstract class String…
- 运行下面程序段的结果是:( )。 public class MyMain{ public static void main(String args){ System.out.println(“Hello Java”); } }