Java Programming Questions & Answers: part14



Software Programming : Java Programming QUESTIONS AND ANSWERS :: part14 : 1 to 5

Following Software Programming language Entrance Multiple choice objective type questions and answers will help you in Software Programming 2024 examinations :

1.Which one of these is a valid constructor declaration for the class named student?

Student(student b) { }
Student Student() { }
private final Student[] { }
void Student() { }
abstract student() { }.

2.Which of the following is/are not hexadecimal numbers? I. 999. II. (hex)23. III. 0x556. IV. 0x1F2.

Both (I) and (II) above
Only (I) above
Only (III) above
(I), (II) and (III) above
All (I), (II), (III) and (IV) above.

3.Which keyword can protect a class in a package from accessibility by the classes outside the package?

don't use any keyword at all (make it default)
Private
Protected
final
static.

4.Consider the following code int number[] = new int[5]; After execution of this statement, which of the following is/are true? I. number[0] is undefined. II. number[5] is undefined. III. number[4] is null. IV. number[2] is 0. V. number.length() is 5.

(II), (IV) and (V) above
Both (I) and (V) above
Both (III) and (V) above
Only (V) above
All (I), (II), (III), (IV) and (V) above.

5.#1 0 0 0 1 0 0 0 1 0 0 11 0 0.224. Which of the following statements about abstract methods/classes in Java is/are true? I. An abstract class cannot be instantiated. II. Constructors cannot be abstract. III. A subclass of an abstract class must defined the abstract methods. IV. Static methods may be declared abstract.

Both (I) and (II) above
(I), (II) and (III) above
Only (I) above
Only (II) above
All (I), (II), (III) and (IV) above.

More Java Programming QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
Too many of us are not living our dreams because we are living our fears.- Les Brown