Java Basics explained in-----Java structure

Source: Internet
Author: User

Earlier we said that Java is an object-oriented language, the basic components of Java programs are classes, classes and properties, methods two parts, each application will have a Mian function, containing the main () method of the class, we call the main class

Package Test; Package Name Packages Package

Public represents the modifier, which is the scope of the class

Static means that any variable or code in the program is automatically allocated by the system at compile time to store the memory, while the so-called static means that the memory allocated after compilation will persist until the program exits the memory and the memory will be released as long as the program is running. (Know about it, after careful analysis)

public class chb{//Just Class

public static void Main (string[] a) {//This is a Main method {method means start

System.out.printIn ("How are You?") ");

}//} end

Note: Java is both English characters, case-sensitive, named filenames and class names capitalized

Java Basics explained in-----Java structure

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.