Home

Java Programming MCQ Question with Answer

Java Programming MCQ with detailed explanation for interview, entrance and competitive exams. Explanation are given for understanding.

Download Java Programming MCQ Question Answer PDF

Question No : 29
Which of the following methods can be used to change the size of a
size() *
resize()

component
dimension()
setSize()
size()

Question No : 30
Which of the following methods can be used to remove a component from the display?

remove()
desappear()
hide()
move()

Question No : 31
The setBackground() method is part of the class

Applet
Component
Container
Object

Question No : 32
When we implement the Runnable interface, we must define the method

start()
init()
runnable()
run()

Question No : 33
Which of the following string can be used as mode string for creating a RandomAccessFile object?

"rw"
"wr"
"0"
'w''

Question No : 34
DataInput is

An abstract class defined is java.io.
A class we can use to read primitive data types.
An interface that defines methods to open files.
An interface that defines methods to read primitive data types.

Question No : 35
Which of the following statements are true?

UTF characters are all 24 bits.
Reader class has methods that can read integers and floats.
Unicode characters are all 16 bits.
all of the above