欢迎来到建筑考试题库网 建筑考试题库官网
全部科目 > Java认证考试 > SCJP程序员认证考试

单项选择题

Given a correctly compiled class whose source code is:

Assume that the class file is located in /foo/com/sun/sjcp/, the current directory is /foo/, and that the classpath contains "." (current directory).  
Which command line correctly runs Commander?()

    A.java Commander
    B.java com.sun.sjcp.Commander
    C.java com/sun/sjcp/Commander
    D.java -cp com.sun.sjcp Commander
    E.java -cp com/sun/sjcp Commander

点击查看答案

相关考题

  • 单项选择题
    Aclassgames.cards.PokeriscorrectlydefinedinthejarfilePoker.jar.AuserwantstoexecutethemainmethodofPokeronaUNIXsystemusingthecommand:javagames.cards.PokerWhatallowstheusertodothis?()

    A.put Poker.jar in directory /stuff/java,and set the CLASSPATH to include /stuff/java
    B.put Poker.jar in directory /stuff/java,and set the CLASSPATH to include /stuff/java/*.jar
    C.Put Poker.jar in directory /stuff/java,and set the CLASSPATH to include /stuff/java/Poker.jar
    D.put Poker.jar in directory /stuff/java/games/cards,and set the CLASSPATH to include /stuff/java
    E.put Poker.jar in directory /stuff/java/games/cards,and set the CLASSPATH to include /stuff/java/*.jar
    F.put Poker.jar in directory /stuff/java/games/cards,and set the CLASSPATH to include /stuff/java/Poker.jar

  • 单项选择题
    What is the result?()

    A.s=14
    B.s=16
    C.s=10
    D.Compilation fails.
    E.An exception is thrown at runtime.

  • 多项选择题
    What two must the programmer do to correct the compilation errors?()

    A.insert a call to this() in the Car constructor
    B.insert a call to this() in the MeGo constructor
    C.insert a call to super() in the MeGo constructor
    D.insert a call to super(vin) in the MeGo constructor
    E.change the wheelCount variable in Car to protected
    F.change line 3 in the MeGo class to super.wheelCount=3

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题