01. Writing The first Java program

Source: Internet
Author: User

One, DOS console common commands

D: Enter drive letter Toggle
Dir (directory): Lists the files and folders in the current directory
MD (Make directory): Create directory
RD (remove directory): Delete directory
CD (change directory) changes the specified directory (enter the specified directory)
CD: Back to top level directory
Cd\: Go back to the root directory
Del (delete): Delete files, delete a bunch of suffix names like files *.txt
Exit: Exit DOS command line
CLS: (Clear screen) clear

II. JRE and JDK

   JRE (Java Runtime Environment Java Run environment)

including Java virtual machines (JVM Java) and the core class libraries required by Java programs, if you want to run a well-developed Java program, you only need to install the JRE on your computer.

   JDK (Java Development Kit Java Development Kit) 

The JDK is available to Java developers, which includes Java development tools and the JRE. So with the JDK installed, you don't have to install the JRE separately.
Development tools: Compilation Tools (Javac.exe) packaging Tools (Jar.exe), etc.

  In simple terms: Java programs developed using the JDK are delivered to the JRE to run.

Third, the first Java program (Hello World)

Source:

class HelloWorld {    publicstaticvoid  main (string[] args) {        System.out.println ("Hello World--by Changlin");}    }

Operation Result:

Thinking:

1, Java in the Main method (string[] args) role?

01. Writing The first Java program

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.