Sams Teach Yourself C in 21 Days

(singke) #1
Answers for Bonus Day 6

Quiz


  1. Yes. The Java compiler will not permit a trywithout a following catch.

  2. No. You must add the new line character \nto the string if you want to start a new
    line.

  3. On java.applet.Applet.

  4. Use the showmethod to display an application.

  5. 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.

  6. Yes, but it is ignored when the applet runs.

  7. The methods initandstartare called, in that order.

  8. The destroymethod.


Answers for Bonus Day 7

Quiz


  1. • 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.



  2. IL stands for Intermediate Language. CLR stands for Common Language Runtime.

  3. a. Create the source file.
    b. Compile the program.
    c. Execute the program.
    4.csc my_prog.cs

  4. .cs

  5. Yes; however, it is not recommended.

  6. 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

Free download pdf