Chapter One Introduction to Java

Source: Internet
Author: User

1. Installation and configuration of JDK

(1) Install the JDK directly (Java SDK with JRE included)

(2) Configuring environment variables: My Computer--right-click Property--Advanced--environment variable--system environment variable--path--edit (Configure the installation path of the JDK to the path attribute)

(3) Start command line mode: After the configuration is successful, enter "CMD" in the Run interface and enter Javac

2, the first program

1  Public class haha{2      Public Static void Main (String args[]) {3         SYSTEM.OUT.PRINTLN ("I Java"); 4     }5 }

Javac compiler: Compile the. java file into a. class file (a class file is one)

Java Runtime class file: specific as follows

Note: Common errors are as follows:

    • Main () is written in Mian ()
    • String is written in sting
    • The file name is the class name of the public class--〉 first capitalization, hump principle

Chapter One Introduction to Java

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.