OCJP(310-065)

多选题Given: And MainClass exists in the /apps/com/company/application directory. Assume the CLASSPATH environment variable is set to "." (current directory). Which two java commands entered at the commandline will run MainClass?()Ajava MainClass if run fro

题目
多选题
Given: And MainClass exists in the /apps/com/company/application directory. Assume the CLASSPATH environment variable is set to "." (current directory). Which two java commands entered at the commandline will run MainClass?()
A

java MainClass if run from the /apps directory

B

java com.company.application.MainClass if run from the /apps directory

C

java -classpath /apps com.company.application.MainClass if run from any directory

D

java -classpath . MainClass if run from the /apps/com/company/application directory

E

java -classpath /apps/com/company/application:. MainClass if run from the /apps directory

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

packagecom.company.application;publicclassMainClass{publicstaticvoidmain(String[]args){}}AndMainClassexistsinthe/apps/com/company/applicationdirectory.AssumetheCLASSPATHenvironmentvariableissetto.(currentdirectory).WhichtwojavacommandsenteredatthecommandlinewillrunMainClass?()

A.javaMainClassifrunfromthe/appsdirectory

B.javacom.company.application.MainClassifrunfromthe/appsdirectory

C.java-classpath/appscom.company.application.MainClassifrunfromanydirectory

D.java-classpath.MainClassifrunfromthe/apps/com/company/applicationdirectory

E.java-classpath/apps/com/company/application:.MainClassifrunfromthe/appsdirectory

F.javacom.company.application.MainClassifrunfromthe/apps/com/company/applicationdirectory


参考答案:B, C

第2题:

Given:Which two can be results?()

A. java.lang.RuntimeException: Problem

B. run.java.lang.RuntimeException: Problem

C. End of method.java.lang.RuntimeException: Problem

D. End of method.run.java.lang.RuntimeException: Problem

E. run.java.lang.RuntimeException: Problem End of method.


参考答案:D, E

第3题:

package com.company.application;public class MainClass{public static void main(String[]args){}}And Main Class exists in the/apps/com/company/application directory.Assume the CLASSPATH environment variable is set to.”(currentdirectory).Which two java commands entered at the command line will run MainClass()

A.java MainClass if run from the/apps directory

B.javacom.company.application.MainClass if run from the/apps directory

C.java-classpath/appscom.company.application.MainClass if run fro many directory

D.java-classpath.MainClass if run fromt he/apps/com/company/application directory

E.java-classpath/apps/com/company/application:.MainClass if run from the/apps directory

F.javacom.company.application.MainClassifrunfromthe/apps/com/company/application directory


参考答案:B, C

第4题:

Users are reporting problems connecting to servers in the remote company.com domain. The administrator suspects this to be a DNS problem. Which of the following commands would the administrator run to identify the DNS server of the remote company.com?()

  • A、dig company.com ns
  • B、ipconfig/all
  • C、ifconfig-a
  • D、dig company.com mx

正确答案:A

第5题:

package com.sun.sjcp; public class Commander{ public static void main(String[]args){ //more code here } } Assume that the class fileis 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.sim.sjcp.Commander
  • C、java com/sun/sjcp/Commander
  • D、java-cpcom.sun.sjcp Commander
  • E、java-cpcom/sun/sjcp Commander

正确答案:B

第6题:

Given:And MainClass exists in the /apps/com/company/application directory. Assume the CLASSPATHenvironment variable is set to "." (current directory). Which two java commands entered at the command line will run MainClass?()

A.java MainClass if run from the /apps directory

B.java com.company.application.MainClass if run from the /apps directory

C.java -classpath /apps com.company.application.MainClass if run from any directory

D.java -classpath . MainClass if run from the /apps/com/company/application directory

E.java -classpath /apps/com/company/application:. MainClass if run from the /apps directory

F.java com.company.application.MainClass if run from the /apps/com/company/application directory


参考答案:B, C

第7题:

A class games.cards.Poker is correctly defined in the jar file Poker.jar.  A user wants to execute the main method of Poker on a UNIX system using the command:  java games.cards.Poker  What allows the user to do this?() 

  • 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 /stuffijava/*.jar
  • F、 put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include /stuff/java/Poker.jar

正确答案:C

第8题:

package com.sun.sjcp;public class Commander{public static void main(String[]args){//more code here}}Assume that the class fileis 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.sim.sjcp.Commander

C.java com/sun/sjcp/Commander

D.java-cpcom.sun.sjcp Commander

E.java-cpcom/sun/sjcp Commander


参考答案:B

第9题:

You are an enterprise administrator for Cer-tech .com. The corporate network of the company consists ofan Active Directory domain. All the servers on the network run Windows Server 2008. The network runs aTerminal server named Server02 to enable remote users to run commonly required applications from theirterminal. You have recently been asked to deploy a Terminal Services application called App1 on Server02. To deploy the application, you first confirmed from the application vendor that the applicationcan be deployed in a Terminal Services environment. The features of App1 are that it does not use Microsoft Windows Installer packages for installation and makes changes to the current user registry duringinstallation. Which of the following options would you choose to install the application to support multipleuser sessions?()

  • A、Run the change user /install command on Server02
  • B、Install the application
  • C、Run the change user /execute command on Server02
  • D、Run the change logon /disable command on Server02

正确答案:A,B,C

第10题:

During a boot, which of the following procedures is most likely to present a menu that prompts the user to copy a dump?()

  • A、 Set the dump device to /dev/hd6. 
  • B、 Run sysdumpdev to set the force copy flag for dump to true. 
  • C、 Run sysdumpdev to set the force copy flag for dump to false. 
  • D、 Increase space in the /tmp directory. 

正确答案:C

更多相关问题