Why can't the whole program just consist of the one line that does the painting ?

  1. In Java, to create an applet, you can't call on functions without defining a class to call them.

  2. To appear on the web, Java must use an applet, and without first defining a class, you won't be painting onto anything.

  3. The drawString function is not defined without the "import" statements at the top.

  4. All of the above.


Correct Option: D

Find more quizzes: