Getting Started with Java

Source: Internet
Author: User

running mechanisms for Java applicationsJava uses the javac (compiler) to compile the program file (the suffix. java) into a. Class (bytecode file) and finally interprets the execution using the virtual machine (interpreter, Java).

Java virtual machines are the core mechanism for implementing cross-platform. Different operating systems have different virtual machines.

There is always a main function in Java, which acts as the entrance to the program, starting from this entry to the end.
1. Create with notebook, Save as: Welcome.java (file name must be Welcome, case must be same)

public  class  Welcome{public static void main(String[] args){    System.out.println("Hello Java!");}

}
2. Compile stage: Open the Command Line window and enter the directory where the Java files are located; Execute command: Javac Welcome.java generate class file.
3. Interpretation and Operation phase: "Java Welcome" output results


Getting Started with Java

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.