Section 5:
Java Development Fundamentals
( click here for the exam objectives )
 
Question 5-1
Which of the following options will run the PropertyCheck class and produce the output SCJA ?
public class PropertyCheck {
    public static void main(String args[]) {
        String myprop = System.getProperty("myprop");
        System.out.println(myprop);
    }
}
Select the correct answer :
a. java -Dmyprop = SCJA PropertyCheck
b. java PropertyCheck -Dmyprop=SCJA
c. java -Dmyprop=SCJA PropertyCheck
d. java - Dmyprop=SCJA PropertyCheck
e. java -Dmyprop=SCJA PropertyCheck.class
Answer

Question 5-2
Which of the following options will successfully compile the following code ?
public class CompileCheck {
    public static void main(String args[]) {        
        System.out.println("SCJA Exam");
    }
}
Select the correct answer :
a. javac CompileCheck
b. javac CompileCheck.class
c. java CompileCheck.java
d. javac CompileCheck.java
e. java CompileCheck.class
Answer

Question 5-3
Which of the following classes or interfaces can be found in the java.util package ?
Select all correct answers :
a. List
b. ArrayList
c. Double
d. String
e. Collections
Answer

Question 5-4
All classes of the java.lang package are available by default and need no special import statements.
Select the correct answer :
a. The statement is true.
b. The statement is false.
Answer

Question 5-5
Which of the following statements represents a correct way of an import statement at the beginning of a java source file ?
Select all correct answers :
a. import java.util.*;
b. import java.io;
c. import java.util.Enumeration
d. import java.net.URL;
Answer


How do you rate this mock exam ?
very easy easy medium advanced hard
Feel free to use the feedback formular to give us detailed comments or suggestions .

 
 
 
 
last modified : 6/21/2012 - 20:38