Java language Overview

Source: Internet
Author: User

A language overview
Who is the father of Java? Did you build it?
Common JDK Versions:
JDK1.4.2
JDK5
JDK7
(2) Features of the Java language
There are many small features, with a focus on two open source, cross-platform
(3) The Java language is a cross-platform
For different operating systems, depending on the JVM to achieve.
(4) The Java language Platform
Se,me,ee

The role and relationship of B:JDK,JRE,JVM (mastery)
(1) function
JVM: Securing the Java language across platforms
Jre:java the operating environment of the program
Development environment of Jdk:java program
(2) Relationship
jdk:jre+ Tools
jre:jvm+ Class Library

My HelloWorld
 class HelloWorld {
  public static void Main (string[] args) {
    system.out.println ("HelloWorld");
  }
 }
  (1) Program interpretation:
The most basic unit of a   a:java program is the class
    format: class name
    Example: Class HelloWorld
  b: When writing content in a class, enclose it in curly braces. The
  c:java program must have a main method to execute.
    format: public static void Main (string[] args)
  d: To point to those things, enclose them in curly braces.
  e: What are you going to do?
    Format: System.out.println ("HelloWorld");
    Note: The contents of "" are subject to change.
  (2) Java program Development execution flow:
  a: Writing Java source program (. java)
  b: Build A. class file by Javac command compilation
   c: Run the. class file with the Java command

Common problems
(1) The extension is hidden
How to find: Tools--Folder Options--View--Remove the check mark for hidden extensions
(2) I ask for the same file name and class name.
In fact, it is possible not to do so.
Javac followed by filename + extension
Class name followed by Java without extension
(3) Java language is strictly case sensitive
(4) See illegal characters: \65307 is definitely a Chinese problem, requires pure English
(5) The pairing problem of brackets.
In general, the parentheses are paired up.
(6) encountered
Cannot find the main method in class HelloWorld, define the main method as
Must be a format problem for the main method.


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.