Question: 20. What is the name for a method that responds to events? A. A container method. B. A snoop method. C. A listener method. D.

20. What is the name for a method that responds to events? A. A container method. B. A snoop method. C. A listener method. D. An application method.

21. Fill in the blanks so that this program displays a JFrame: import java.awt.*; public class microGUI { public static void main ( String[] args ) { JFrame frm = new ___________(); frm.___________( 150, 100 ); frm.___________( true ); } } A. Form, setVisible, setOn B. JFrame, setSize, setVisible C. Frame, setVisible, setSize D. Window, setSize, paint ...6/8

22. Which of the following sets the frame to 300 pixels wide by 200 high? A. frm.setSize( 300, 200 ); B. frm.setSize( 200, 300 ); C. frm.paint( 300, 200 ); D. frm.setVisible( 300, 200 );

23. What three types of software are needed in a complete GUI program A. GUI Components, Event Listeners, Application Code B. Action Events, Window Objects, Containers C. Frames, Windows, Containers D. Libraries, Toolkits, Interfaces

24. What reserved word is used to distinguish the instance variables of an object from identically named parameters of a constructor? A. this B. that C. mine D. main 25. What is the class that applets are based on? A. applet B. JApplet C. Apple D. AWT

26. Can the source code for your applet be compiled by the usual javac compiler? A. No---because applets have no main() B. No---the web browser compiles the code. C. Yes---an applet is just another class as far as the compiler is concerned. D. Yes---if you are going to run it from the DOS prompt.

27. If you are using the Graphics object gr and wish to change the pen color to red, what should you do? A. gr.setColor( Color.red ) B. gr.setPen( Color.red ) C. setBackground( Color.red ) D. gr.setRed( ) ...7/8

28. What class is the mother of all classes in Java. A. Object Class B. Super Class C. Main Class D. None of the above.

29. What type of inheritance is supported in C++ A. Single Inheritance B. Multiple Inheritance C. Super Inheritance D. Sub-class Inheritance.

30. How many methods are in ActionListerner Interface. A. 1 B. 2 C. 3 D. 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!