Test 007 Java
Test 007 Java
1. Which declaration of the main method below would allow a class to be started as a standalone
program.
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)
5. In Java, a lower precision variable can be assigned to a higher precision value. For example, a
byte type can be assigned to an int type variable?
A. True, B. False
7. If you want your condition to depend upon two conditions both being true, what is the proper
notation to put between the two Boolean statements?
A. !, B. || , C. &&, D. $$
8. Which of the following statements about the Java language is true? Java supports:
A. procedureal and object oriented programming .
B. only procedural programming.
C. only OOP.
D. Java does not support either procedural or object-oriented programming.
10. Select the correct option for getting the number of elements in array
A. array.length, B. array.length - 1, C. array.size, D. array.length()
13. Choose the appropriate data type for this field: isTeacher
A. double, B. boolean C. string, D. char