public static void main(String[] args) { String str = “null‟; if (str == null) { System.out.println(”null”); } else (str.length() == 0) { System.out.println(”zero”); } else { System.out.println(”some”); } } What is the result?()
第1题:
下列( )是对main ()主方法的正确表示。
A.public void static main (String args []) {…}
B.void public static main (String args []) {…}
C.static public void main (String args []) {…}
D.以上都不正确
第2题:
A. public static void main();
B. public static void main( String args );
C. public static void main( String args[] );
D. public static void main( Graphics g );
E. public static boolean main( String a[] );
第3题:
Which declarations will allow a class to be started as a standalone program?()
第4题:
下列有关main()方法的签名正确的是哪些?()
第5题:
哪一行定义了一个静态变量?()
第6题:
下列方法定义中,方法头不正确的是()。
第7题:
声明Java独立应用程序main()方法时,正确表达是()。
第8题:
public class OuterClass { private double d1 1.0; //insert code here } You need to insert an inner class declaration at line2. Which two inner class declarations are valid?()
第9题:
public class Yikes { public static void go(Long n) {System.out.println(”Long “);} public static void go(Short n) {System.out.println(”Short “);} public static void go(int n) {System.out.println(”int “);} public static void main(String [] args) { short y= 6; long z= 7; go(y); go(z); } } What is the result?()
第10题:
下面哪些main方法可用于程序执行()
第11题:
第12题:
public static
public static final
final
public static abstract
第13题:
下面的例子中
using System;
class A
{
public static int X;
static A(){
X=B.Y+1;
}
}
class B
{
public static int Y=A.X+1;
static B(){}
static void Main(){
Console.WriteLine("X={0},Y={1}",A.X,B.Y);
}
}
产生的输出结果是什么?
第14题:
以下是JAVA中正确的入口方法是? ()
第15题:
Public class test ( Public static void stringReplace (String text) ( Text = text.replace (‘j’ , ‘i’); ) public static void bufferReplace (StringBuffer text) ( text = text.append (“C”) ) public static void main (String args[]} ( String textString = new String (“java”); StringBuffer text BufferString = new StringBuffer (“java”); stringReplace (textString); BufferReplace (textBuffer); System.out.printLn (textString + textBuffer); ) ) What is the output?()
第16题:
下面关于Java应用程序中main方法的写法,合法的是()。
第17题:
作为Java应用程序入口的main方法,其声明格式可以是()。
第18题:
main方法是Java程序执行的入口点,关于main方法的方法头以下哪项是合法的()?
第19题:
public class Foo { static int[] a; static { a[0]=2; } public static void main( String[] args) {} } Which exception or error will be thrown when a programmer attempts to run this code?()
第20题:
Java语言中常量的定义是哪项?()
第21题:
接口中的成员变量被隐含地声明为()
第22题:
public static void main(String[] args){}
public static void main(String args){}
public void main(String[] args){}
public static int main(String[] args){}
第23题:
int Long
Short Long
Compilation fails.
An exception is thrown at runtime.
第24题:
public static int i;
static public int i;
public int static i;
int public static i;