Exam 13: Graphics and Java 2D
Exam 1: Introduction to Computers and Java42 Questions
Exam 2: Introduction to Java Applications34 Questions
Exam 3: Introduction to Classes and Objects34 Questions
Exam 4: Control Statements: Part 142 Questions
Exam 5: Control Statements: Part 227 Questions
Exam 6: Methods: a Deeper Look39 Questions
Exam 7: Arrays and Arraylists44 Questions
Exam 8: Classes and Objects: a Deeper Look27 Questions
Exam 9: Object Oriented Programming: Inheritance22 Questions
Exam 10: Object-Oriented Programming: Polymorphism28 Questions
Exam 11: Exception Handling27 Questions
Exam 12: Gui Components: Part 170 Questions
Exam 13: Graphics and Java 2D19 Questions
Exam 14: Strings27 Questions
Exam 15: Files,streams and Object Serialization29 Questions
Exam 16: Generic Collections41 Questions
Exam 17: Lambdas60 Questions
Exam 18: Recursion13 Questions
Exam 19: Searching, Sorting and Big O22 Questions
Exam 20: Generic Classes and Methods15 Questions
Exam 21: Custom Generic Data Structures17 Questions
Exam 23: Concurrency55 Questions
Exam 24: Accessing Databases With Jdbc35 Questions
Exam 25: JavaFX26 Questions
Select questions type
In the Java coordinate system,the point (0,0)is ________.
Free
(Multiple Choice)
4.9/5
(34)
Correct Answer:
D
The Java statement:g.draw3DRect(290,100,90,55,true);
Free
(Multiple Choice)
4.9/5
(36)
Correct Answer:
C
Which of the following statements about the Java 2D API is true?
(Multiple Choice)
4.8/5
(40)
Class FontMetrics declares methods that can be used to obtain the following font metrics ________.
(Multiple Choice)
4.7/5
(40)
The JColorChooser dialog allows colors to be chosen by all but which of the following?
(Multiple Choice)
4.9/5
(42)
Consider the code segment below:
Int xValues[] = {100,150,200,100};
Int yValues[] = {30,130,30,30};
G.drawPolyline(xValues,yValues,4);
What kind of figure does it draw?
(Multiple Choice)
4.7/5
(29)
Which of the following statements about the Graphics object is true?
a)The Graphics object is an argument to class Component's repaint method.
b)The Graphics object is instantiated by the user.
c)The Graphics object is the argument to a lightweight GUI component's paintComponent method.
d)The Graphics class is abstract.
e)The Graphics object manages a graphics context.
(Multiple Choice)
4.9/5
(32)
Which of the following are valid Java statements?
a)Color c = new Color(0,255,0);
b)Color c = new Color(0.0f,1.0f,0.0f);
c)Color c = new Color(0.0d,1.0d,0.0d);
d)setGreen;
(Multiple Choice)
4.9/5
(28)
The fact that class Graphics is abstract contributes to Java's portability because ________.
(Multiple Choice)
4.8/5
(37)
Which of the following properly create and initialize a Font object?
a)Font f = new Font();
b)Font f = new Font("Serif",Font.Bold + Font.Italic,19);
c)Font f = new Font(Font.Bold,20,"SansSerif");
d)Font f = new Font(20,Font.Bold,"Monospaced");
(Multiple Choice)
4.8/5
(36)
Consider the Java code segment below:
Polygon poly2 = new Polygon();
Poly2.addPoint(100,30);
Poly2.addPoint(100,130);
Which of the following will create a polygon that is a square?
(Multiple Choice)
4.8/5
(41)
The Graphics2D method(s)that determine(s)the color and texture for the shape to display is/are:
(Multiple Choice)
4.9/5
(35)
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)