Java note (1) java environment

Source: Internet
Author: User

Java programs are composed of many classes. classes contain a lot of data and methods for processing the data. Theoretically, classes can be designed by themselves. However, java programmers actually use the ready-made java class libraries, these class libraries are called java APIs.

Therefore, two things should be learned in the java World: 1. java language; 2. Using java class libraries.

Java is an object-oriented, distributed, cross-platform, multi-thread, network, and web programming language. It has three features in Object-Oriented Programming:

1. Data encapsulation: private, protected, and public for data confidentiality purposes.

2. Inheritance: the data or methods in the parent class (super class) are inherited to its sub-classes (subclass) for use. The sub-classes can also be inherited and used to achieve repeated use of data.

3. Polymorphism: methods with the same name have different program codes. That is, two show (), but the meaning is different, and the program is naturally different. One show () covers the other show () and becomes a "polymorphism ", it is also called the "same name ".

The first java program file:

Public class Hello {

Public static void main (String args [])

{

System. out. printIn ("hello word! ");

}

}

 

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.