Java Getting Started learning

Source: Internet
Author: User

I. Steps to develop Java programs
   1). Write the source program (the program ends in. java) the Java source program file uses. java as the extension.
   2). Compile (using Java directives to compile the source program, the compiled file ends with a. Class)
   3). Run (run the compiled file using Java directives)
Two. Java Program structure
  Outer frame public  class  class name {
  } Note: Class name is consistent with file name
   Inner frame
public static void Main (string[] args) {
   } Note: The method name must be a main   comment:     1). The main method is the Java program's entry
   2). A program can have only one main () method
three. output directive
   System.out.println ("");
     System.out.print ("");
  NOTE:
    1) The system first letter uppercase
    2) println output after wrapping
       print output only
  
Four common errors
   1) Public-decorated classes must have the same name as the Java file
   2) void in Main () method
   3) Java is case sensitive
   4) in Java, a complete statement is ";" End
   5) The string output must be quoted in quotation marks and must be quoted in English
  \ n and \ t
    \ n line break
 \ T tab (four characters is a tab)

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.