JAVA题库:格林模拟试题三(上)(5)

文章作者 100test 发表时间 2007:03:14 17:04:27
来源 100Test.Com百考试题网


question 15)

which of the following statements are true?

1) constructors cannot have a visibility modifier
2) constructors can be marked public and protected, but not private
3) constructors can only have a primitive return type
4) constructors are not inherited


question 16)

what will happen when you attempt to compile and run the following class?

class base{

base(int i){

    system.out.println("base").

    }

}



class severn extends base{

public static void main(string argv[]){

        severn s = new severn().

    }

void severn(){

         system.out.println("severn").

    }

}

1) compilation and output of the string "severn" at runtime
2) compile time error
3) compilation and no output at runtime
4) compilation and output of the string "base"


question 17)

which of the following statements are true?

1) static methods do not have access to the implicit variable called this
2) a static method may be called without creating an instance of its class
3) a static method may not be overriden to be non-static
4) a static method may not be overloaded



相关文章


JAVA题库:格林模拟试题三(上)(4)
java基础:遍历m取n的所有组合
JAVA基础:Java中异常机制深入研究
Java服务器端编程安全必读(上)
JAVA题库:格林模拟试题三(上)(5)
SCEA:你需要知道哪方面的知识?
JAVA题库:格林模拟试题三(上)(3)
JavaThreadinJVM
线程基础---wait(),notify的应用一例
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛