πŸ“Š JAVA
Q. A ------------ is an object that the user can see on the screen and-in most cases-interact with.
  • (A) an Event
  • (B) a window
  • (C) a Component
  • (D) a Listener
πŸ’¬ Discuss
βœ… Correct Answer: (C) a Component
πŸ“Š JAVA
Q. A ------------- is a component that can hold other components.
  • (A) A window
  • (B) a container
  • (C) A control
  • (D) a form
πŸ’¬ Discuss
βœ… Correct Answer: (B) a container
πŸ“Š JAVA
Q. The method that returns the selected item from a List component is
  • (A) getSelected()
  • (B) getSelectedString()
  • (C) getSelectedItem()
  • (D) getSelectedData()
πŸ’¬ Discuss
βœ… Correct Answer: (C) getSelectedItem()
πŸ“Š JAVA
Q. The class used to make a standalone application in java.
  • (A) Applet
  • (B) Panel
  • (C) Frame
  • (D) Form
πŸ’¬ Discuss
βœ… Correct Answer: (C) Frame
πŸ“Š JAVA
Q. ------------------- is an example of container class
  • (A) Label
  • (B) Panel
  • (C) TextField
  • (D) Button
πŸ’¬ Discuss
βœ… Correct Answer: (B) Panel
πŸ“Š JAVA
Q. The class used to encapsulate fonts is
  • (A) Graphics
  • (B) Font
  • (C) Applet
  • (D) Component
πŸ’¬ Discuss
βœ… Correct Answer: (B) Font
πŸ“Š JAVA
Q. Number of primitive data types in Java are?
  • (A) 6
  • (B) 7
  • (C) 8
  • (D) 9
πŸ’¬ Discuss
βœ… Correct Answer: (C) 8
πŸ“Š JAVA
Q. What is the size of float and double in java?
  • (A) 32 and 64
  • (B) 32 and 32
  • (C) 64 and 64
  • (D) 64 and 32
πŸ’¬ Discuss
βœ… Correct Answer: (A) 32 and 64
πŸ“Š JAVA
Q. Automatic type conversion is possible in which of the possible cases?
  • (A) Byte to int
  • (B) Int to long
  • (C) Long to int
  • (D) Short to int
πŸ’¬ Discuss
βœ… Correct Answer: (B) Int to long
πŸ“Š JAVA
Q. Find the output of the following code
Code:
int Integer = 24;
char String  = ‘I’;
System.out.print(Integer);
System.out.print(String);
  • (A) Compile error
  • (B) Throws exception
  • (C) I
  • (D) 24 I
πŸ’¬ Discuss
βœ… Correct Answer: (D) 24 I