Java basics _ day1

Source: Internet
Author: User

Java basics _ day1

Learning content:

1. Java Development History

2. Differences and functions between jdk and jre.

3. Download and install jdk and jre

4. Configure the environment, path and classpath

5. helloworld Program

6. Conversion between hexadecimal values

7. Comments, flags, constants

8. Common variable types

Summary:

Java is developed by sun, where jdk is for developers and jre is a tool for running java programs. The reason why java programs are cross-platform is that virtual machines, among which jre includes virtual machines, jdk also contains jre. The latest jdk version is 8.0, and path is used to build the environment on the windows operating system. The path includes the bin directory, the bin directory contains the tools required by java. The java source code is in the java format and changed to the class format after javac compilation, that is, the bytecode format, classpath is the environment to be set up to run the class file, but it does not seem to need to be set up now.

Helloworld program:

Public class Hello {

Public static void mian (String args []) {

System. out. println ("hello world! ");

}

}

Class Definition class Hello, public static void mian is the main method, and braces are the definition interval of the program.

Java comments include single-line comments and multi-line comments. Multi-line comments cannot contain multi-line comments.

A variable is a space opened up in the memory to store data. The types of production check variables include integer, floating point, complex, and Boolean.

Int

Byte

Short

Long

Float

Double

Char

Boolean



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.