(A) first met java --- my first java program

My first acquaintance java --- a java program

Course Catalog

l ready

l environment ready to open Requested Procedure

l environment variable Path set

l First Program

 

 

aims

<<  realize their HelloWorld run and see the results

 

One, ready

(1) Computation desk (personal computer)

(2) Computer hardware: Part naked eye can see

(3) Computer software

                   System Software: xp, windows, Linux, Mac

                   Applications: office, qq ....

(4) Language

                   Natural Language: interpersonal communication and exchange of

                   Computer Language: people and computers for communication.

                                     C,C++,C#,Java

(5) Human-Computer Interaction

                   Graphical interface: just double-click easy to operate, plug-operation

                   DOS command: the need for some common commands memory

(6) the basic concepts of unit

The concept of bit (B: 'bit : is a binary data (0,1) à bit is the smallest unit of computer

Byte (B: Byte) : . 8 bits and a byte à byte is the basic unit of computer

Kilobytes (KB ) : 1KB 2 ^ 10 = B

Megabytes (MB ) : 1MB = 2 ^ 10 KB

Gigabytes (GB ) : 1GB = 2 ^ 10MB

Terabytes (the TB ) : 2 ^ = 1TB 10GB

32-bit and 64-bit operating system means: CPU processing capacity of one 32-bit data or 64-bit

Second, understanding the function keys and keyboard shortcuts

         (1) understanding the function keys

                   tab

                   shift

                   ctrl

                   alt

                   windows

                   Blank

                   up down left right

                   Enter

                   Screenshot QQ Screenshot: Ctrl + Alt + A

 

         (2) commonly used shortcuts

                   Select All Ctrl + A

                   Copy Ctrl + C

                   Paste Ctrl + V

                   Cut Ctrl + X

                   Undo Ctrl + Z

                   Save Ctrl + S

                   Recovery Ctrl + Y

                   Open the Start menu Win

                   Turn on the computer window Win + E

   Open the Run window Win + R

  Show Desktop / minimize all windows Win + D

Third, the common DOS commands as follows: 

                   Switching letter: letter colon

                            d: Enter

                   Change directory: cd path plus

                            cd file name

                   Fallback directory

                            cd .. (to return to the parent directory)

                            cd \ (back to the root directory of the current disk)

                   Check the contents of the current directory

                            to you

 

                   Autofill

                            Tab

                   Use last used command

                            ↑   ↓

                   Clear screen

                            cls

                   drop out

                            exit

 

Four, Java language Overview

    • Java was born in 1995 in the sun's
    • 2009 was the acquisition of oracle
    • Java language: object-oriented, easy to learn
    • Suitable for large enterprise-class management system, large-scale Internet system

 

         (1) Java language nouns:   

                jdk: java Development Kit (Java Developlment Kit)

jre: java runtime environment (Java Runtime Enviroment)

jvm: java virtual machine (Java Virtual Machine)

        

         Features (2) Java language

                       Simple and efficient, object-oriented, platform-independent.

       Once, run everywhere

 

         (3) Java language is cross-platform, may I ask is how to ensure it?

                   For different operating systems, by different jvm to achieve.

         (4) Java language platform

JavaEE late to learn javaWeb Internet enterprise development project

               JavaSE are learning basic grammar java standard edition, standard library

              JavaME embedded development for the development of mobile terminals

Five, JDK, JRE, JVM's role and relationship

         (1) the role of

                   JVM: Java language to ensure cross-platform virtual machine

                   JRE: Java Runtime Environment program

                   JDK: Java program development environment

         (2) Relationship

                   JDK: JRE + Tools

                   JRE: JVM + class library

 

Six, JDK installation

         Installation JDK step (be resolved):

       Jdk official website: http: //www.oracle.com/jp/index.html

         

Seven, write test cases

         ① tested in a non-installation drive

         ② Create a new file Test.java

         ③ writing code

class HelloWorld{

         public static void main(String args[]){

                   System.out.println("HelloWorld");

}

}

 

④ Test.java file compiled by javac command in a DOS window, enter:

 javac Test.java

⑤ run HelloWorld.class file with the java command

  java Test

 

 

 

Eight, Frequently Asked Questions

         (1) extension is hidden

                   How to find: Tools - Folder Options - View - remove Hide extensions

(2) We are now generally consistent file name and class name.

    .java file among the class name (behind the class with the name) after after compilation, will be the class name as a .class file name.

                             However, note: with the javac followed by the file name extension +              

 

                            With the back of java class name without extension

(3) Java language strictly case-sensitive

 

        (4) Do not mistake the word

                  

         (5) see illegal characters:

                   We must all write procedures require punctuation marks in English state.

                  

         (6) pairing problems brackets.

                   In general, the brackets are in pairs.

         (7) encountered not find the main method in the class HelloWorld

 

         (8) forget to write back the statement semicolon

                  

 

Guess you like

Origin www.cnblogs.com/lotus-wmm/p/10978857.html