Answers for Bonus Day 6
Quiz
- Yes. The Java compiler will not permit a trywithout a following catch.
- No. You must add the new line character \nto the string if you want to start a new
line. - On java.applet.Applet.
- Use the showmethod to display an application.
- There are several techniques for responding to user events, but the most important
one uses the actionmethod, which is called automatically when an event such as a
mouse click occurs. - Yes, but it is ignored when the applet runs.
- The methods initandstartare called, in that order.
- The destroymethod.
Answers for Bonus Day 7
Quiz
- • C# is simple.
- C# is modern.
- C# is object-oriented.
- C# is powerful and flexible.
- C# is a language of few words.
- C# is modular.
- C# will be popular.
- IL stands for Intermediate Language. CLR stands for Common Language Runtime.
- a. Create the source file.
b. Compile the program.
c. Execute the program.
4.csc my_prog.cs - .cs
- Yes; however, it is not recommended.
- You should review the code to verify that you didn’t create a logic error.
878 Appendix F
49 448201x-APP F 8/13/02 11:22 AM Page 878