πŸ“Š JAVA
Q. The method used to set Fonts is
  • (A) Graphics
  • (B) Font
  • (C) Applet
  • (D) Component
πŸ’¬ Discuss
βœ… Correct Answer: (B) Font
πŸ“Š JAVA
Q. The method setFont() is defined in---------- class
  • (A) Applet
  • (B) Font
  • (C) Container
  • (D) Component
πŸ’¬ Discuss
βœ… Correct Answer: (D) Component
πŸ“Š JAVA
Q. The layout manager that lets you align components at north, south, east, west directions is
  • (A) BorderLayout
  • (B) GridLayout
  • (C) FlowLayout
  • (D) GridBagLayout
πŸ’¬ Discuss
βœ… Correct Answer: (A) BorderLayout
πŸ“Š JAVA
Q. The layout manager that lays out a container's components in a rectangular grid.
  • (A) BorderLayout
  • (B) GridLayout
  • (C) FlowLayout
  • (D) GridBagLayout
πŸ’¬ Discuss
βœ… Correct Answer: (B) GridLayout
πŸ“Š JAVA
Q. The class used for drawing graphics in an application is
  • (A) Canvas
  • (B) Graphics
  • (C) Layer
  • (D) Container
πŸ’¬ Discuss
βœ… Correct Answer: (B) Graphics
πŸ“Š JAVA
Q. The method in Graphics class to draw a circle/oval with specified width and height.
  • (A) drawCircle()
  • (B) drawShape()
  • (C) drawOval()
  • (D) none of these
πŸ’¬ Discuss
βœ… Correct Answer: (C) drawOval()
πŸ“Š JAVA
Q. The method in Graphics class to set the drawing color
  • (A) setForeground()
  • (B) setDrawingColor()
  • (C) setBrushColor()
  • (D) setColor()
πŸ’¬ Discuss
βœ… Correct Answer: (D) setColor()
πŸ“Š JAVA
Q. The method used to draw an ellipse is
  • (A) drawEllipse()
  • (B) drawCircle()
  • (C) drawOval()
  • (D) none of these
πŸ’¬ Discuss
βœ… Correct Answer: (C) drawOval()
πŸ“Š JAVA
Q. Which of the following statements is legal in Java? (i) mysRef = (Mystery) mySecret; (ii) mysRef = (Mystery) secRef;
  • (A) Only (i)
  • (B) Only (ii)
  • (C) Both (i) and (ii)
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (B) Only (ii)
πŸ“Š JAVA
Q. In a ____ control structure, the computer executes particular statements depending on some condition(s).
  • (A) looping
  • (B) repetition
  • (C) selection
  • (D) sequence
πŸ’¬ Discuss
βœ… Correct Answer: (C) selection