Java programmer must read: Basic (9)

Source: Internet
Author: User
Tags documentation modify
Program | Programmer java programmer must read: Basic time: 2001/09/13 13:31 Author: ZSC Pacific Network College

 
2.8 Problem and practice of object-oriented concepts

The tutorials in this section test your understanding of objects, classes, messages, and so on, and we do this by doing some exercises and answering some questions.


2.8.1 problem

You can use API documentation to answer these questions:


The ClickMe applet uses color.red to set the paint color to red. What other colors can be used like this?


How do I set the color to purple (purple)?


2.8.2 Practice

Now, use the knowledge you learned from the API documentation to modify the ClickMe applet. In order to compile this program, you also need to Spot.java files. The specific modifications are as follows:


Modify this applet to draw a green box instead of a red dot.


Modify this applet to display your name in purple instead of a red dot.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.