多选题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 from the /apps directoryBjava com.company.application.MainClass if run from the /apps directoryCjava -classpath /apps com.company.application.MainClass if run from any directoryDjava -classpath . MainClass if run from the /apps/com/company/application directoryEjava -classpath /apps/com/company/application:. MainClass if run from the /apps directory

多选题
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


参考解析

解析: 暂无解析

相关考题:

多选题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 from the /apps directoryBjava com.company.application.MainClass if run from the /apps directoryCjava -classpath /apps com.company.application.MainClass if run from any directoryDjava -classpath . MainClass if run from the /apps/com/company/application directoryEjava -classpath /apps/com/company/application:. MainClass if run from the /apps directory

单选题A company that makes Computer Assisted Design (CAD) software has, within its application, some utilityclasses that are used to perform 3D rendering tasks. The company’s chief scientist has just improved theperformance of one of the utility classes’ key rendering algorithms, and has assigned a programmer toreplace the old algorithm with the new algorithm. When the programmer begins researching the utilityclasses, she is happy to discover that the algorithm to be replaced exists in only one class. The programmer reviews that class’s API, and replaces the old algorithm with the new algorithm, being carefulthat her changes adhere strictly to the class’s API. Once testing has begun, the programmer discovers thatother classes that use the class she changed are no longer working properly. What design flaw is mostlikely the cause of these new bugs?()AInheritanceBTight couplingCLow cohesionDHigh cohesionELoose coupling

单选题A UNIX user named Bob wants to replace his chess program with a new one, but he is not sure where theold one is installed. Bob is currently able to run a Java chess program starting from his home directory /home/bob using the command: java -classpath /test:/home/bob/downloads/*.jar games.Chess Bob’s CLASSPATH is set (at login time) to: /usr/lib:/home/bob/classes:/opt/java/lib:/opt/java/lib/*.jar  What is a possible location for the Chess.class file?()A/test/Chess.classB/home/bob/Chess.classC/test/games/Chess.classD/usr/lib/games/Chess.classE/home/bob/games/Chess.class

多选题A team of programmers is reviewing a proposed API for a new utility class. After some discussion, theyrealize that they can reduce the number of methods in the API without losing any functionality. If theyimplement the new design,which two OO principles will they be promoting?()ALooser couplingBTighter couplingCLower cohesionDHigher cohesionEWeaker encapsulation

单选题Given: Which statement is true?()A Compilation fails because the hashCode method is not overridden.B A HashSet could contain multiple Person objects with the same name.C All Person objects will have the same hash code because the hashCode method is not overridden.D If a HashSet contains more than one Person object with name="Fred", then removing another Person,also with name="Fred", will remove them all.

单选题Given: What is the result?()A BB The code runs with no output.C Compilation fails because of an error in line 12.D Compilation fails because of an error in line 15.E Compilation fails because of an error in line 18.