Java Interview Questions

Q91. SecurityException is for
(a) Caused when there's not enough memory to allocate a new object
(b) Caused when an applet tries to perform an action not allowed by the browser's security setting
(c) Caused when the system runs out of stack space
(d) Caused by referencing a null object

Q92. Which of the following is true “An applet can play an audio file represented by the AudioClip interface in the java, applet package Causes the audio clip to replay continually for______”
(a) public void stop()
(b) public void play()
(c) public void loop()
(d) Both A and B

Q93. ________ method is called only once during the run time of your applet
(a) init()
(b) start()
(c) stop()
(d) destroy()

Q94. How many reserved keywords are currently defined in the Java language
(a) 32
(b) 39
(c) 45
(d) 50

Q95. Output of relational operators is
(a) Short
(b) Integer
(c) Boolean
(d) All of above

Q96. Which operator is used to allocate memory to array variable in Java
(a) calloc
(b) new
(c) malloc
(d) None of above

Q97. Which one is not a keyword in Java
(a) Private
(b) Throw
(c) Void
(d) Run

Q98. Which of the following operator in Java have context dependent meaning
(a) +
(b) ++
(c) &
(d) All of the above

Q99. Which of the following does not have a superclass in Java
(a) System
(b) Object
(c) Lang
(d) Exception

Q100. Which of the following statements will result in compilation error in Java
(a) signed int abc;
(b) unsigned int abc;
(c) signed byte abc;
(d) All of the above

Q101. In Java Garbage collector frees the programmer from worrying about
(a) Memory issues
(b) dangling references
(c) creating new objects
(d) recursion

Q102. In Java, Is null an object
(a) Yes
(b) No
(c) Sometimes Yes
(d) None of the above

Q103. Which of the following component is not used to act as a input/output stream in Java
(a) file
(b) class
(c) a pipe
(d) array of bytes

Q104. What is the immediate super class of Applet Class
(a) Object
(b) Window
(c) Panel
(d) Component

Q105. In Javascript each window object has sub-object, which called
(a) Features
(b) Properties
(c) Characteristics
(d) Qualifiers


1 2 3 4 5 6 7 8