This is our longquiz from this morning. don't worry.. I am not cheating off a quiz.. it's already 22:00 o'clock where I am. this quiz was on 8am. I am studying for our final exam tomorrow. we weren't told the right answers.. and I don't have a book right now either. I couldn't borrow in the library for this semester anymore and I can't find any answers in the internet for some of them. I was hoping you could point out any mistakes I have and tell me the right answer... * * I. Multiple Choice * * D 1. The GUI stands for ________ user interface. * a. graph b. graphics c. graphically d. graphical e. either b and c f. all of the above * A 2. Every GUI program requires a ________. * a. window b . user c. width d. height e. properties f. none of the above * C 3. Where to add the various components in GUI? * a. window b. JFrame c. content pane d. both a and b e. none of the above * A 4. Windows are measured in ________ of heights and width. * a. pixel b. inches c. centimeters d. dots e. all of the above * E 5. It is a component in GUI which can be used for both input and output. * a. JTextbox b. JButton c. JTextField d. JLabel e. both a and c * B 6. Statements that may generate an exception are placed in what block? * a. catch b. try c. finally d. either a and c e. none of the above * D 7. It is an occurrence of undesirable output or situation that can be detected during program execution. * a. catch b. try c. finally d. exception e. object reference * C 8. It is a block where all codes are always being executed regardless of whether an exception occurs. * a. catch b. try c. finally d. exception e. both a and d * A 9. It is block where it specifies the type of exception it can capture and contain an exception handler. * a. catch b. try c. finally d. exception e. none of the above * A 10. An exception that the compiler can recognize is called _____. * a. checked exception b. unchecked exception c. choice exception d. selected exception * D 11. It is a group of a specific number of members. * a. components b. fields c. modifiers d. class e. object * B 12. It is the data member of the class. * a. components b. fields c. modifiers d. class e. object * A 13. It refers to the component of the class. * a. components b. fields c. modifiers d. class e. object * A 14. It is used to alter the behavior of the class. * a. modifiers b. object c. components d. fields e. none of the above * C 15. The method of the class is called _________. * a. instance object b. instance variable c. instance function d. instance method * D 16. It is a location in secondary storage used to store information. * a. memory b. flash disk c. RAM d. hard disk e. none of the above * A 17. The class FileReader is contained in the package ____. * a. java io b. java.util c. javax.swing d. none of the above * A 18. The class PrintWriter is contained in the package ________. * a. java.io b. java.util c. javax. swing d. none of the above * C 19. What is the last step process in java i/o? * a. Use the appropriate method b. create an appropriate object c. close object d. close the files * A 20. What are the two classes being used to input data from a file? * a. Scanner and Filereader b. Scanner and InputStreamReader * c. BufferedReader and Filereader d. none of the above * D 21. Methods that have a return data type. * a. returning – value methods b. void method c. returned – value method d. value – returning method * A 22. A variable declared in the method heading. * a. actual parameter b. active parameter c. format parameter d. formal parameter * B 23. The fifth property in the code is called ____. * a. heading b. definition c. body d. parameters e. none of the above * D 24. An expression listed in a call to a function is called _____ * a. actual parameter b. active parameter c. format parameter d. formal parameter * A 25. It will indicate the visibility of the function. * a. modifiers b. components c. return type d. method name e. object * * II. True or False * * True 1. Every window has a width and depth. * True 2. The reserved word extend allows you to create a new class from an existing one. * False 3. In a problem statement, every verb is a possible class. * False 4. In a problem statement, every noun is a possible method. * False 5. To display the window, you need not to invoke a method. * False 6. Division by zero is a checked exception. * False 7. All exceptions must be reported to avoid compilation errors. * True 8. One way to handle an exception is to print an error message and exit the program. * True 9. There are seven common constructors and methods of the class throwable. * True 10. The try block may could not have followed by a catch and finally block. *
Jump to Post
DrEinstein - please wrap your Einstein-sized intellect around the fact the OP said "I am studying for our final exam tomorrow." and that was 2 months ago.
Your hope that "I helped at least a bit" is unrealistic.
Please check the dates of posts before replying.
All 7 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.