Dark Horse programmer-Java basics-Basic Learning

Source: Internet
Author: User

1: The most common dos operations:

Enter the specified Disk: drive letter: for example, "D: add the Enter key.

Create a folder: MD space file name, such as the md kkk enter key

Go to the specified file: first go to the specified disk, and then execute the CD space folder directory. For example: CD Java \ day01 enter key, so you can go to the day01 folder.

Other commands are not mentioned, and are rarely used. You can refer to the relevant materials. I will take a screenshot below to show you:

2: JDK Installation

Download a JDK:Http://www.oracle.com/technetwork/java/javase/downloads/index.html, It is strongly recommended to download from the official website. Then, just like installing a common software, the installation is basically silly and the next step is complete.

3: Environment configuration for verification (this is entirely for our convenience in the future ):

For Windows 7 or XP systems, right-click a computer or my computer, choose Properties> System Properties> advanced> environment variables. Find the following system variables and find the path, copy and paste the JDK installation path to the beginning and end with ";" and click "OK". You will be able to ignore the other options and set the permanent environment variables; let's verify it later;Search at the start buttonProgramEnterCMDCommand, InputJava-versionCommand, there will beJDKDescriptionJDKThe installation is successful. EnterJava OrJavacCommand.PEnvironment Variable set successfully:

4: Start our entry-level program Hello word

First, we chose editplus to provide a convenient editor for ourselves. We can download a green version on the Internet, so we won't talk about it. Baidu: editplus green version, after installing and registering, we will officially start ..

Create a new Java file named Hello word. Save the type Java (*. Java) and save it to D: Java \ day01. Enter the followingCode:

Public class helloworld

{

 

Public static void main (string [] ARGs)

{

 

System. Out. println ("Hello world! ");

 

}

 

}

After the code is complete, we need to compile the program. This is required for every Java program to be executed. We use the doc command line: Enter the CMD command in the search program bar of the Start button to compile the program, on the screen, you can play:Hello world !. Congratulations, you have completed your first Java program.

 

5. Notes

I hope every beginner will develop a good habit and make corresponding comments:

Single line comment ://

Text comment /***/

6: Have a good time !!

 

 

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.