Beruflich Dokumente
Kultur Dokumente
1. Which declaration of the main method below would allow a class to be started as a
standalone program. Select the one correct answer.
A. public static int main(char args[])
B. public static void main(String args[])
C. public static void MAIN(String args[])
D. public static void main(String args)
E. public static void main(char args[])
2. Select the one most appropriate answer. A top level class without any modifier is
accessible to -
A. any class
B. any class within the same package
C. any class within the same file
D. any subclass of this class.
3. Which of these array declarations and initializations are legal? Select the two correct
answers.
A. int arr[4] = new int[4];
B. int[4] arr = new int[4];
C. int arr[] = new int[4];
D. int arr[] = new int[4][4];
E. int[] arr = new int[4];
4. Which of these are Java keywords. Select the five correct answers
A. TRUE
B. volatile
C. transient
D. native
E. interface
F. then
G. new
5. Ans : a,c