Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

35 Java select questions: 1.Every class is either directly or indirectly derived

ID: 659896 • Letter: 3

Question

35 Java select questions:

1.Every class is either directly or indirectly derived from the Object class.

A.true

B.false

2.A collection suitable for use in an application with multiple threads accessing a list is

A.ArrayList

B.LinkedList

C.HashSet

D.Vector

The operation for adding an item to a queue is called

A.requeue

B.enqueue

C.dequeue

D.proqueue

4.The key word this is the name of a reference variable that an object can use to refer to itself.

A.true

B.False

5.Which of the following statements is not true?

A.Radio buttons are round and Check boxes are square

B.Radio buttons are often grouped together and are mutually exclusive; Check boxes are not

C.Radio buttons implement ActionListener; Check boxes implement ItemListener

D.They are all true

6.Look at the following applet code.

Import javax.swing.*;

Import java.awt.*;

Public class GraphicsTest extends JApplet

Public void init()

Public void paint(Graphics g)

g.setFont(new Font(

Explanation / Answer

Answers for the Questions:

1.The answer is TRUE,every class in java is diretly or indirectly derived from Object class.The Object class is the super class for all the classes defined in Java as well as the classes defined by the programmer too.It is in java.lang package.the programmer may or may not use or overwrite the methods of Object class.

2.The answer is Vector.Vector class is mostly used in multithreaded programming because it is Synchronized.the synchronization is most important while working with Threads.

3.the operation for adding an item to a Queue is called Enqueue.

4.the answer is TRUE."this" is the keyword used inside the class to refer the same class object.We can use this keyword anywhere in the class.

5.the incorrect option is C.the Radio buttons and checkboxes both implements the ItemListener Interface only.radio buttons are mutually exclusive and check boxes are not.

6.the answer is D.there is no code to generate the oval or circle.

7.The answer is C.here,we use the keyword "implements" for class C.hence it is the Interface.we always implements interface and extends the class.

8.The answer is a.If the converges value is <1 the series is converges absolutely.It is >1 series is not converges.

9.the answer is Linked list.linked list contains two values one is the data value another one is the address of the next list value.

10.The ArrayList class is defined in Java.util package.hence the option is D.

11.the answer is option C.the equals method is used to compare two objects,which is the method of Object class.the user can overwrite it and use according to the code.

12.the correct option is C.the circular linked list's last node contains the address of the first node hence it is easy to navigate from first node to last node.

13.the correct option is A.

14.the option is D.java supports .wav,.au and MIDI type 1 and .aiff etc..,

15.the option is D.catch block is to manage the exceptions that are thrown by try block.

16.the option is D.ArrayIndexOutOfBounds exception is genrates whenever the elements adds beyond the specified Index value.

17.the correct option is HashMap.HashMap doesnot allows the duplicate values in it.

18.The correct option is B.there are 10 rows and 20 columns specified.

19.the correct option is D.Iterato interface have the follwing methods,next(),hasnext() and remove().

20.Statements was not clear.

21.the correct option is D.The abstract class must be override by the programer who uses it.

22.the correct option is A.

23.the correct option is A.

24.the correct option is A.

25.the correct option is A.

26.the correct option is A.

27.the correct option is D.

28.the correct option is A.

29.the correct option is C.

30.the correct option is C.

31.the correct option is D.

32.the correct option is A.

33.the correct option is A.

34.the correct option is C.

35.the correct option is D.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote