Sie sind auf Seite 1von 2

VIT UNIVERSITY

(ESTD. U/S 3 OF UGC ACT 1956)


SCHOOL OF INFORMATION TECHNOLOGY & ENGG
QUIZ I

Name : _________________________________ Reg No. ___________________

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. Which of the following is true. Select the two correct answers.


A. A class that is abstract may not be instantiated.
B. The final keyword indicates that the body of a method is to be found
elsewhere. The code is written in non-Java language, typically in C/C++.
C. A static variable indicates there is only one copy of that variable.
D. A method defined as private indicates that it is accessible to all other
classes in the same package.
1. Ans : b
2. Ans : b
3. Ans : c,e
Ans : b, c, d, e, g

5. Ans : a,c

Das könnte Ihnen auch gefallen