I HAVE 4 MC QUESTION . do you know the answers :?
Q1 - A Java SE method from a framework class CallManager, in package com.ikmnet, has the signature belowMAX 3 ANSWERS)
String[] getCallerCredentials()
Creation of a tester class com.mycompany.CallManagerTest has been started and this class needs to access getCallerCredentials to check results. Which of the following changes can ensure that the call is successfully made?
A. Include CallManager's JAR file in the classpath of CallManagerTest.
B. Make CallManagerTest a subclass of CallManager.
C. Within CallManagerTest, declare an instance of CallManager as public.
D. Move the class CallManagerTest to com.ikmnet and change the package declaration of CallManagerTest to:
package com.ikmnet;
E. Qualify the call with the classname com.ikmnet.CallManager.getCallerCredentials().
Q2 Which of the following are NOT legal Java SE method signatures?(MAX 3 ANSWERS)
A. volatile BigDecimal findRoot(BigDecimal number)
B. BigDecimal findRoot(BigDecimal number)
C. transient BigDecimal findRoot(BigDecimal number)
D. synchronized BigDecimal findRoot(BigDecimal number)
E. private static BigDecimal findRoot(BigDecimal number)
Q3 - Which of the following statements correctly describe how Java ClassLoader works for the class below?(MAX 3 ANSWERS)
package src.com.test
class ClassLoaderDemo {
}
A.
The first request to load the ClassLoaderDemo class will come to the Bootstrap ClassLoader.
B.
To explicitly load the ClassLoaderDemo class, use the code below:
try{
Class.forName("src.com.test.ClassLoaderDemo", true, classLoaderDemo.class.getClassLoader().getParent() );
} catch (ClassNotFoundException e) {
}
C.
When a request to load ClassLoaderDemo class comes to the Extension ClassLoader, it will look into the jre/lib/ext directory for the class.
D.
The java.lang.ClassLoader class will first call its findClass() method to find the ClassLoaderDemo class, and then call its loadClass() method to load the ClassLoaderDemo class.
E.
The class ClassLoaderDemo will be loaded by Java using the three default class loaders below:
Bootstrap ClassLoader
Extension ClassLoader
Application ClassLoader
Q4 Which of the following statements correctly describe the syntax of the try-catch-finally construct in Java SE Exception Handling?(MAX 3 ANSWERS)
A.
finally blocks and catch blocks must always appear in conjunction with a try block.
B.
A finally block must be preceded by the catch block.
C.
The try block must be followed by either a catch block or a finally block.
D.
All the catch blocks that appear in the try block will be executed.
E.
A try block must be followed by a finally block.