5.JAVA Basics Review

Source: Internet
Author: User

What are the characteristics of Java?

1. Simplicity

2. Object-Oriented languages

3. A platform-agnostic language (cross-platform)

4. Robustness and security

5. Multithreading

6. Garbage collection mechanism

2. What is a JDK? What is a JRE?

The JDK is the Java Development toolset. (compilation environment, running environment, debugging environment, base Class library)

The JRE is the operating environment of Java. (Virtual machine, core class library and connection file; JDK includes JRE)

3. What is the directory structure of the JDK?

Bin: Holds the executable command file. Javac.exe is the compiled executable file;

Java.exe is an executable file that executes Java.

DB: Database Support directory.

The sample code for the Demo:applet.

Include: the header file that holds the JDK support.

JRE: The running environment.

LIB:JDK's base Class library. (Debug environment)

Sample code for the Examples:java program.

The source code of the Src.zip:java.

5, what variables, the three elements of the variable, what should be noted before the use of variables?

A variable is a named memory space. The content of the space can change, and the new data can be used to replace the old data to achieve the results of memory reuse.

Variable

4. Three elements: data type. variable name. Variable Value

Variables must be initialized before they are used, and in Java it is not possible to initialize variables.

5, how to configure environment variables? Why Configure environment variables?

How to configure: Add the Jdk/bin directory under the path key of the environment variable

Why configure environment variables: Javac.exe is required at compile time; Java.exe is required for execution. and two files in Jdk/bin. In order to use the JDK's compilation and runtime environment in any directory, you need to set up the environment directory.

6. How to compile Java files? How do I execute a Java program?

Compile Java file: javac+ space + file name (file suffix. java)

Execute Java File: java+ Space + class name (main class, with Main ())

7. What are the requirements for file names and class names that must be consistent?

If a class is declared public, the file name and class name require consistency.

5.JAVA Basics Review

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.