Java chapter I first read Java

Source: Internet
Author: User

Chapter I. Notes

What is a computer program: a series of ordered sets of instructions for the production of certain functions

Java technologies include:

Java SE: Standard Edition

Java EE: Enterprise Edition

Java ME: Mobile Version

Developing Java program steps: 1. Writing 2. Compiling 3. Running
1. Writing:
A. Curly braces appear in pairs
The word after B.class is the same as the file name. (!! Include case)
C.java Strictly case-sensitive
2. Compiling:
Command: Javac file name. java
Produce the result: A. class suffix file (this file, can not read, garbled)
(Note!!!) If the code is modified, it needs to be recompiled and run)
3. Run:
Command: Java file name (no suffix!!) )
Produce results: Output information
SOURCE program: To. Java End
Compiled file: End With. class

Code parsing:
The outer framework of the public class demo{//program (class framework)
public static void Main (string[] args) {//program's inner frame (Main method)
System.out.println ("java!! Hello! "); /printout (add line wrapping at the end)
System.out.print ("hello!"); /No line break after printing
}
}

Escape character:
\ n wrap \ \ tab (equivalent to a tab in the Keyboard tab equivalent to 8 spaces)

Comments:
Single-line Comment://ctrl+/
Multiline Comment:/* start, */End ctrl+shift+/ctrl+shift+\ Cancel

Specification:
1. Same level, left-aligned format code: CTRL+SHIFT+F
2. To be included, to indent (Tab)
3. Class naming, Pascal (the first letter of each word capitalized, other letters lowercase), see the name of righteousness such as MySchool

To import a project:
Menu bar First (File), oblique-down arrow (Import), first plus sign expand, select Longest-click browse button, select the project folder->finish
Show line number:
Left scroll bar right click to check Show line numbers

To configure the environment variables for the JDK:
1) Create a variable in the system variable
Name: Java_home
Value: is the path where you install the JDK, for example: D:\MyEclipseY2\jdk1.6.0_24
2) Locate the path variable in the system variable

Java chapter I first read 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.