Javase01-Getting Started

Source: Internet
Author: User
Tags create directory java se

1. Getting Started with Java

  Java: A high-level object-oriented programming language introduced by Sun (Stanford University Network, Stanford University Inc.) in 1995.

  SUN:2009 was acquired by Oracle (Oracle Corporation).

  James Goslin: The father of Java.

  Java History:2004 j2se1.5 release, is a milestone in Java development. and renamed to Java SE 5.0;

2005 Sun Company Public Java SE 6.0,java various versions are renamed;

J2ee→java EE;

J2se→java SE;

J2me→java ME;

Acquired by Oracle (Oracle Corporation) in 2009.

 Java three major technical architecture: Javase/javaee/javame (renamed after Java5.0 version)

  Java Features: simple, object-oriented, distributed, compiled and interpreted, robust, secure, portable cross-platform, high performance, multi-threading, dynamic

Portability (cross-platform): Runs through a Java virtual machine on each platform. Java virtual machines are not cross-platform

  Development environment for Java:

JDK (Java Development Kit) Java Development Kit

    JRE (Java Runtime Environment) Java Runtime Environment

JVM (Java vsan Machina) Java Virtual machine

    JDK = JRE + compile tools;

    JRE = JVM + The class library provided by Sun Company;

   Development environment Construction:

    * Download JDK and install

* Configure environment variables (increase JAVA_HOME=JDK installation directory, add classpath=., modify Path=%java_home%\bin)

  The first program-helloworld:

    1) write the source file with Notepad, the file name is "Helloworld.java";

public class helloworld{public         static void Main (String args[]) {                 System.out.println ("Hello world!");}         }

2) Compile: Execute javac helloworld.java→helloworld.class in cmd window

3) Execute: Java helloworld→ get result output Hello world!

Common cmd commands

–MD: Create directory –dir: Lists files in the current directory and folders –rd: Delete directory –CD: Enter the specified directory –CD. : Back to previous level directory –cd/: Rollback to root –del: Delete file –exit: Eject dos command line – root drive: Toggle root Letter E:Java operating mechanism . java files are generated through Javac.exe compilation. class files run with Java.exe (JVM load) to get results     

Java is both a compiled language and an interpreted language

Java program composition: Java source files (. java) and bytecode files (. Class)

  Be aware that:

    Java language is strictly case sensitive

    A Java original file can have more than one class, but there can be only one class defined as public decoration;

    If the public class is included in the source file, the source file must have the same name as the public class;

When a source file contains n Java classes, an n-bit bytecode file is generated after compilation, that is, each class generates a separate class file, andThe byte-code file name is the same as its corresponding class name;

    

  

    

Javase01-Getting Started

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.