# Java Foundation
English
Java is a programming language. Sun released Java in 1995. After years developing, nowadays, Java plays an increasingly import role in internet, game development and mobile communication programming. Java was influenced by C++. It is a 'pure' object-oriented programming language. Java inherites the class concept of C++ and adds multi-thread, exception handling and other advanced techniques. Meanwhile, Java abandoned the pointer operator of the C++ language.
中文
Java 是一种程序设计语言。 Sun 公司在 1995 年发布了 Java 。经过多年的发展,如今 Java 在互联网、游戏开发和移动通信中发挥着越来越重要的作用。 Java 收到了 C++ 的影响,它是一种“纯粹”的面向对象编程语言。Java 继承了 C++ 的类概念,并增加了多线程、异常处理和其他高级技术。同时,Java 放弃了 C++ 语言中的指针操作符。
public class HelloWorld {
public static void main(String args[]) {
System.out.println("Hello World!");
}
}
English
The function of this program is to pring "Hello World!". A Java program is composed of one or more classes, at least one cleass. This program contains a class "HelloWorld", which has a method "main". The main is the start point to excute the Java program, which is the same as C++ program. A class that contains the method main is refered to as the main class. A class can have several methods.
中文
这个程序的功能是打印 “Hello World!”。 Java 程序由一个或多个类组成,至少一个类。这个程序包含一个名为“HelloWorld”的类,该类有一个“main”的方法。“main”方法是执行 Java 程序的起点,这与 C++ 程序相同。包含“main”方法的类被称为主类。一个类可以有多个方法。
English
A method is a collection of statements, just like a function of C or C++ program. In this example, there is only one statement in method main, which outputs "Hello World!" to screen.
中文
方法是语句的集合,就像 C 语言或者 C++ 程序中的一个函数。在这个例子中,main 方法中只有一条语句,这条语句将 “Hello World!” 输出在屏幕上。