Core Java - Interview Questions and Answers

91. What is meant by controls and what are different types of controls in AWT?

Controls are components that allow a user to interact with your application and the AWT supports the following types of controls:
Labels, Push Buttons, Check Boxes, Choice Lists, Lists, Scrollbars, Text Components.
These controls are subclasses of Component.

92. What is the difference between choice and list?

A Choice is displayed in a compact form that requires you to pull it down to see the list of available choices and only one item may be selected from a choice.

A List may be displayed in such a way that several list items are visible and it supports the selection of one or more list items.

93. What is the difference between set and list?

Ans: Set stores elements in an unordered way but does not contain duplicate elements, whereas list stores elements in an ordered way but may contain duplicate elements.

94. what is the basic difference in rmi & corba.

both are distributed technologies.
rmi is used when both client & server are in java.
corba is used when client & server are written in different lang.
IDL comes into picture. as it changes native calls to java or vice versa.

95. The Java interpreter is used for the execution of the source code.

True
False
Ans: a.

96. On successful compilation a file with the class extension is created.

a) True
b) False
Ans: a.

97. The Java source code can be created in a Notepad editor.

a) True
b) False
Ans: a.

98. The Java Program is enclosed in a class definition.

a) True
b) False
Ans: a.

99. What declarations are required for every Java application?

Ans: A class and the main( ) method declarations.

100. What are the two parts in executing a Java program and their purposes?

Ans: Two parts in executing a Java program are:
Java Compiler and Java Interpreter.
The Java Compiler is used for compilation and the Java Interpreter is used for execution of the application.



Post a Comment

Mới hơn Cũ hơn