Java_abstract

来源:互联网 发布:js校验身份证号 编辑:程序博客网 时间:2024/04/30 09:48
1.JDK ,JRE and JVM ?

JDK  (Java Development Kit)       JRE (Java Runtime environment)  JVM (Java Virtual Machine)

JVM belongs to JRE then JVM and JRE belongs to JDK.



2.Environment Variable    ==  Windows

JAVA_HOME ; path of jdk         Example  = C:\Program Files\Java\jdk1.7.0_51

PATH  :\;%JAVA_HOME%\bin;     **Note : Shouldnt set the CLASS_PATH

3.Environnment Variable  == Ubuntu(Linux)

    @1 : You can install jdk by this terminal ,and linux will automaticily to solve everything baout jdk and jre.

        Example : JAVA_HOME=/usr/lib/jvm/jdk1.6.0_38

                            CLASSPATH=.:$JAVA_HOME/lib

                            PATH=$PATH:$JAVA_HOME/bin

                            export JAVA_HOME

                            export CLASSPATH

                            export PATH

4. The first Java class .

public class Test{

    public static void main(String [] args)}
            System.out.println("Hello Java");

      }

}



#public  : this mean thats have a big jurisdiction here  example  // private ,protected.

#class : its mean this is a normally class in Java.

#Test : this is an alias for java class.

#static  : this is mean Main function  is just static .

#main : tell others i am a Main function.

#(String [] args) : tell other im String and i have a parameter named args, and we can change this paramete.

 

Iparhan_Java  2016-8-19
1 0
原创粉丝点击