Java Learning (iii) classes

Source: Internet
Author: User
Class
public class dog{  String breed;  int age;  String color;  void Barking () {  }   void Hungry () {  }   void Sleeping () {  }}

This thing is a template.

Previously encountered, such as a user class, you can define ID,USERNAME, etc., wait until the foreground to pass a user's information, the new instance accepts all the parameters of the user under the foreground

For example, some processing of user data as a class, the class inside the definition of Change password, add users and other methods, in other classes call the method (for example, MVC, control layer call service and then call DAO)

(Superficial understanding, the great gods do not laugh, but I think that after I learned more to see the current idea, it would be very interesting, so let's write)

Java Learning (iii) classes

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.