Syvum Home Page

Home > Quiz Games > Java Programming >

Java Programming : java.awt and java.io : Multiple Choice


Learn about java.awt and java.io packages.

Formats Info Page Worksheet / Test Paper Quiz Review
Multiple choice

Your Performance  

1.

Which of the following methods can be used to remove a java.awt.Component object from the display?

  remove()

  delete()

  move()

  hide()

  disappear()

  Half-n-half Clue
 

2.

Which of the following methods can be used to change the size of a java.awt.Component object?
(A) dimension()
(B) setSize()
(C) area()
(D) size()
(E) resize()

  (B), (D) & (E)

  (A), (B) & (E)

  (B) & (E)

  (D) & (E)

  (A), (B), (C) & (E)

  Half-n-half Clue
 

3.

When we invoke repaint() for a java.awt.Component object, the AWT invokes the method:

  draw()

  show()

  update()

  paint()

  Half-n-half Clue
 

4.

If you want to assign a value of 99 to the variable year, then which of the following lines can be used within an tag?

  < param = radius value = 99 >

  < number = 99 >

  < param number = 99 >

  < param name = number value = 99 >

  number = getParameter(99)

  Half-n-half Clue
 

5.

Which exception is thrown by the read() method of InputStream class?

  FileNotFoundException

  ReadException

  IOException

  None of these

  Exception

  Half-n-half Clue
 

6.

The setBackground() method is part of the following class in java.awt package:

  Component

  Object

  Graphics

  Container

  Applet

  Half-n-half Clue
 

7.

Which of the following methods can be used to draw the outline of a square within a java.awt.Component object?
(A) fillRect()
(B) drawLine()
(C) drawRect()
(D) drawString()
(E) drawPolygon()

  (A), (B) & (C)

  (C), (D) & (E)

  (A), (B), (C) & (E)

  (B) & (C)

  (B), (C) & (E)

  Half-n-half Clue
 


 
12 more pages in Java Programming


Contact Info © 1999-2024 Syvum Technologies Inc. Privacy Policy Disclaimer and Copyright
Previous
-
Next
-