<< the 1th chapter of the first knowledge java>>

Source: Internet
Author: User

A collection of ordered instructions written to allow a computer to perform certain operations or solve a problem.

Steps to develop Java programs: (1) Writer program (2) compile (3) run

Structure of the Java program: (1) write a framework for the program, such as public class helloword{} (2) to write a frame of the main () method, such as public static void Main (string[] args{}

A program can have only the main () method. (3) writing code

Java Program Comments: (1) Single-line comments, using//Start (2) multiline comments, with "/*" beginning with "*/" end.

java Coding Specification: (1) encoding must be decorated with public. (2) A single statement is written on one line. (3) The portion enclosed in {} usually represents a hierarchy of the program, "{" is generally placed at the bottom of the beginning line of the structure, "}" is aligned with the first line of the structure and takes a separate line. (4) A lower level of the statement or comment should be more than a level of statements or comments indented a number of spaces before writing, so that the program clearer, increase the readability of the program.

Java is primarily used to develop two types of programs: desktop applications and intrenet applications.

Program development There is a law, that "must be wrong" * * *

Common error: (1) class can not be arbitrarily named (2) void (3) Java for the English letter case sensitivity (4) ";" is required (5) "" "is required

<< the 1th chapter of the first knowledge 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.