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.

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

  update()

  draw()

  paint()

  show()

  Half-n-half Clue
 

2.

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

  move()

  remove()

  delete()

  disappear()

  hide()

  Half-n-half Clue
 

3.

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

  Container

  Graphics

  Applet

  Object

  Component

  Half-n-half Clue
 

4.

Which of the following applet tags is legal to embed an applet class named Test into a Web page?

  < applet
code = Test.class width = 200 height = 100>

  < applet
param = Test.class width = 200 height = 100>

  < applet
class = Test width = 200 height = 100>

  < applet>
code = Test.class width = 200 height = 100>

  < applet
code = Test.class width = 200 height = 100

  Half-n-half Clue
 

5.

Which are the valid ways to create DataInputStream streams?

  new DataInputStream();

  new DataInputStream(new File("in.dat"));

  new DataInputStream(new FileInputStream("in.dat");

  new DataInputStream("in.dat")

  new DataInputStream("in.dat", "r");

  Half-n-half Clue
 

6.

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()

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

  (D) & (E)

  (B) & (E)

  (A), (B) & (E)

  (B), (D) & (E)

  Half-n-half Clue
 

7.

DataInput is

  an abstract class defined in java.io.

  an interface that defines methods to read primitive data types.

  a class we can use to read primitive data types.

  an interface that defines methods to open files.

  Half-n-half Clue
 


 
12 more pages in Java Programming


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