Java Basic Knowledge points

Source: Internet
Author: User

1. Java What are the characteristics of language?

Simplicity, object-oriented language, a platform-independent language, robustness and security, multi-threading, garbage collection mechanism;

2. how to compile and execute Java file? What are the commands for generating help documents?

Compiling: Javac file name

Execution: Java class name

Generate Help Document: Javadoc file name

3. What is the workflow of a virtual machine?

Write the source file *.java---Compile the source file into a bytecode file by Javac *.class

Class loading------Bytecode validation-------interpreter------Operating system

4. JDK and JRE What is it? How does the main method write?

The JDK is the Java Development toolset, which contains the compilation environment, the running environment, the debugging environment, the base class library; The JRE is the Java Runtime Environment, including virtual machines, core class libraries, and linked files

The JDK contains the JRE;

public static void Main (string[] args) {}

5. What is an identifier? How many identifiers are there? What are the naming rules for identifiers?

Any place that can be named is called an identifier.

The name we choose is called an identifier, there are two types of identifiers, the user identifier, and the system identifier is also called a keyword. has a special meaning, so the user identifier cannot have the same name as the system identifier;

Naming rules:

Identifiers cannot be keywords or true,false,null;

Identifiers can contain letters, numbers, underscores, dollar signs

The first letter of the identifier must be a letter or an underscore, a dollar sign, and not a number;

Identifiers are case-sensitive and do not specify a maximum length;

Naming conventions:

Ask for a name to know;

Class name, starting with an uppercase letter, named after the hump.

Method name and variable, lowercase letter start, also use hump name;

Constants, all made up of uppercase letters;

Java Basic Knowledge points

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.