JavaDeploy
SiteMap
Readers Writers
Java Streams
Java Programming
Java Language
Java Graphics
«Prev
Next»
Java Language
Packages Interfaces
Java Classes - Quiz
Java Graphics
Java Graphics - Quiz
Java Graphics Conclusion
MultiThreaded Programming
Multithreaded Programming - Conclusion
Set Daemon Threads
Multithreaded Programming - Quiz
Multithreading Fundamentals - Quiz
Handling Exceptions
Understanding Exceptions
Throwing Exception
Catching Exceptions
Catching Exceptions
Custom Exceptions
finally Clause
Handling Exceptions Conclusion
Java Input Output
Create Reader Streams
Java Graphics Fundamentals - Quiz
Each question is worth one point. Select the best answer for each question.
1.
What method in the Graphics class do you use to draw rectangles?
Please select the best answer.
A.
drawRectangle()
B.
drawRect()
C.
drawSquare()
2.
If you want to display a scanned photograph in a Java applet, what image format is best to use?
Please select the best answer.
A.
JPEG
B.
GIF
C.
Windows bitmap
3.
What method in the Applet class do you use to load an image?
Please select the best answer.
A.
loadImage()
B.
openImage()
C.
getImage()
4.
Which one of the following lines of code properly invokes a method in the Graphics class to draw an image stored in the Image object named img at the position (10, 20)?
Please select the best answer.
A.
drawImage(img, 10, 20);
B.
drawImage(img, 10, 20, this);
C.
paintImage(img, 10, 20);
Your score is 0.0
Submit
Quiz Explanation