Java language Overview

Source: Internet
Author: User

Java language Overview:
Do not give language bondage, mainly learn to develop ideas, language is a tool

In the company's main learning is the development process


Java is a compiled language:

Compiled languages: Need to be compiled to run

Interpreted language: a process that does not require compilation to run directly

Java is not a dynamic language:
Dynamic Language: JavaScript
Example:
Java:int a=100;
A= "Hello World";//Error
Js:var a=100;
A= "Hello World";//Correct

Java has three systems: Javase (now Learning) Java EE (web) javame (Android)

Java is a cross-platform language: once compiled and run everywhere.

Based on a JVM (virtual machine), virtual machines Ensure that Java programs are cross-platform

Xxx.java during compilation Xxx.class

Question: Why Java is a cross-platform
A: Java virtual machines are not cross-platform, and Xxx.class can be run on virtual machines in different versions.

Java is an object-oriented language:

Start with the object everything is an object

Example:
Refrigerator:
Process-oriented: function (open) function (off)
Object-Oriented: object. Open object. Close

Environment Preparation:
1. Download the virtual machine
2. Install the virtual machine
JDK: Can be used for Java development Java run (contains JRE)
Jre:java Runtime Environment (contains virtual machine Core class library)
3. Configure Environment variables:
Java_home: Put Java home directory such as: C:\Program files\java\jdk1.7.0_07
Path: Run the program such as: C:\Program Files\java\jdk1.7.0_07\bin
CLASSPATH: The location of the core class library tells the JRE where to find the running class library
%java_home%/lib/dt.jar;%java_home%/lib/tools.jar

It is best to set it in the system environment variable, which is valid for all users.

How to prove that the environment is configured: Enter Java javac in cmd
View Java version: Java-version


Java's first applet:
Hello World

Java class name and Java file name requirements are consistent

Entry point of the program: Main method

To compile before running: run in cmd

Compile: Javac xxx.java--->xxx.class compiled byte code
Run: Java XXX

Eclipse Green's Software

Java language Overview

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.