Questions from Starting Out With Java


Q: When using a Graphics object to draw an oval, what invisible

When using a Graphics object to draw an oval, what invisible shape is the oval enclosed in?

See Answer

Q: What values are contained in the two arrays that are passed to

What values are contained in the two arrays that are passed to a Graphics object’s drawPolygon method?

See Answer

Q: What Graphics class methods do you use to perform the following tasks

What Graphics class methods do you use to perform the following tasks? 1. Draw a line. 2. Draw a filled rectangle. 3. Draw a filled oval. 4. Draw a filled arc. 5. Set the drawing color. 6. Draw a rect...

See Answer

Q: What is the difference between a mouse press event and a mouse

What is the difference between a mouse press event and a mouse click event?

See Answer

Q: What interface would a listener class implement to handle a mouse click

What interface would a listener class implement to handle a mouse click event? A mouse press event? A mouse dragged event? A mouse release event? A mouse move event?

See Answer

Q: What type of object do mouse listener and mouse motion listener methods

What type of object do mouse listener and mouse motion listener methods accept? What methods do these types of objects provide for determining a mouse cursor’s location?

See Answer

Q: If a class implements the MouseListener interface but does not need to

If a class implements the MouseListener interface but does not need to use all of the methods specified by the interface, can the definitions for those methods be left out? If not, how are these meth...

See Answer

Q: What tag marks the beginning and end of an HTML document?

What tag marks the beginning and end of an HTML document?

See Answer

Q: Look at the following program and tell what it will output when

Look at the following program and tell what it will output when run: public class ExceptionTest { public static void main(String[] args) { int number; String str; try { str = "xyz"; number = Integer.p...

See Answer

Q: What is an adapter class, and how does it make some

What is an adapter class, and how does it make some programming tasks easier?

See Answer