Java Programming Questions & Answers: part15



Software Programming : Java Programming QUESTIONS AND ANSWERS :: part15 : 11 to 15

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

11.What does the following line of code do? Textfield text = new Textfield (10);

Creates text object that can hold 10 columns of text
Creates text object that can hold 10 rows of text
Creates the object text and initializes it with the value 10
The code is illegal
Creates text object that can hold 10 columns of text and 10 rows of text.

12.Which of the following is not true?

Every time the class is instantiated, a new copy of each of the instance variables is created
Every time the class is instantiated, a new copy of each of the class variables is created
A class has only one copy of each of its static members, which are shared by all the instances of the class
Static members are accessed without an instance of a class
An object is the instance of the class.

13.Which of the following contain error? I. int x[] = int[10];. II. int[] y = new int[5]; III. x = y = new int[10]; IV. int a[] = {1, 2}; int b[]; b = a; V. int i = new int(10);

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

14.Which of the following applet tags is legal to embed an applet class named Test into a Web page?

< applet
= Test.class width = 200 height = 100>
< applet
= Test width = 200 height = 100>
< applet>

More Java Programming QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
Trust because you are willing to accept the risk, not because it’s safe or certain