Initial knowledge of Java and simple Java file writing and considerations

Source: Internet
Author: User

The origins of Java : the main developer of the bearded Java language, James Gosling, is also known as the father of the Java language. Marc Andressen, founder and Deputy executive officer of Sun Gage and Netscape, who heads the Department of Technology, announced on May 23, 1995 that the Java technology was officially born and included in the forum to Sunword's audience Netscape Navigator this web browser. More than 10 years later, the Java programming language has evolved into "a computing language, a platform, a Network Computing Architecture (Sun CEO: MAC)".        

Java Platform Categories: The Java programming language is embodied in Javase, Java EE, and Javame, and the implementation of the programming language is embodied in Java SE.

Java Technology Platform: Java technology can be divided into Java programming languages and Java platforms. The Java programming language is a high-level programming language characterized by the following linguistic features:

A. Simple B. Structural neutrality

C. object-oriented (Javaoo, Object-oriented programming: Javaoop) d. Distributed

E. Portable F. High performance

G. Multi-threaded H. Robust

I. Dynamic J. Security

Java platform: The so-called platform refers to the program running hardware or software environment. Today's popular platforms include Windows, Linux, UNIX, and Mac OS, which can be described as a combination of the operating system and the underlying hardware. The Java platform differs from these platforms in that the Java platform is a pure software platform that runs on other hardware-based platforms. Two components of the Java platform:

1.Java virtual machines (Java virtual machine, abbreviated JVM);

2.Java application Programming Interface (Java application P glory for each interface, referred to as Java API);

The Java language is a Face object language programming language, and the class is the basic construction unit of a Java program, and all the languages in the Java program appear in a class.

Java source program editing : Writing Hellojava.java files

Public class hellojava{

public static void Main (string[] args) {

System.out.println ("Hello World");

}

}

     /*

1.Java Source program file has the extension. java;

2. The file name must be exactly the same as the class name, must pay attention to case, the first letter of the class name must be capitalized;

3. Execution Program: Javac.exe compile, generate many. class bytecode files, because the bytecode file is not an executable file, so it cannot be executed;

The 4.main Main method is the entry point for the Java Runtime Engine (JRE) or "Java.exe" command process;

5. There can be multiple class-declared classes in the source file; Eg:class person{//defines another class}

6.java program has three keywords: public, static, void, main (can control the process of the program);

7.JVM calls the main () method to start executing the Java program. The signature of the main () method is: public static void Main (string[] args);

8.Java annotation of three kinds of technology: single-line Comment://;        Multiline Comment:/* */(Note: Multi-line annotations cannot be nested); Document Comment:/** */;

9. Each statement is ";" End

*/

EXECUTE as follows:

Javac Hellojava.java

Java Hellojava        

personal experience : Because in the course of learning, we will find that many things are smattering, not very thorough, the end is easy to blur, and there are many things, we can not really see the nature of the existence of things, as well as its meaning and source, so if there is a good technical blog to summarize, One can let us clear the clue, know the origin of things, let us understand more thoroughly, and secondly, to summarize the study, found some of the potential problems usually not pay attention to, Sunline, is conducive to the exchange of technology, mutual learning and common progress.

Initial knowledge of Java and simple Java file writing and considerations

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.