Xiaokang will accompany you to learn JAVA---JAVA basics and java Basics

Source: Internet
Author: User

Xiaokang will accompany you to learn JAVA---JAVA basics and java Basics

This article is a small Summary of JAVA.

1. There are three ways to annotate Java:

(1) start with the "//" Mark until the end of the line;

(2) text between the symbols "/*" and;

(3) document comments.

2. If a class is declared as public, the file name of the class must be obtained to compile smoothly.

3. main () is a quite special method in Java. It must be declared as public, so that it can be called elsewhere in the class, and main () method has no return value, so the void keyword must be added before it.

4. System. out refers to the standard output. The connected println is composed of print and line, meaning that the content in the brackets is printed on the standard output device-display.

5. Because Java programs are composed of classes, there must be at least one class in a complete Java program.

6. Java variable names can consist of letters, numbers, underscores (_), and dollar signs ($). However, identifiers cannot start with numbers or be reserved keywords in Java. In addition, Java variables are case sensitive.

7. There are three methods to set variables: Set variables during declaration, set variables after declaration, declare variables at any position in the program, and set variables.

8. Methods to Improve program readability include:

(1) Add comments to the program;

(2) Get a meaningful name for the variable;

(3) keep each row with only one statement;

(4) Appropriate indentation.

 

 

 

Like other languages, Java also has many reserved keywords, such as public and static. These reserved keywords cannot be used as identifiers. The reserved keywords in Java are listed below. These keywords do not need to be forced by the reader, because once these keywords are used as identifiers, the editor will automatically prompt an error.

TIPS: You don't need to remember all of the following keywords. Just get familiar with them. These keywords will be frequently used in future studies and will naturally be remembered.

Reserved keywords in Java:

Abstract boolean break byte case catch

Char class continue default do double

Else extend false final finally float

For if implement import instanceof int

Interface long native new null package

Private protected public return short static

Synchronized super this throw throws transient

True try void volatile while


You can learn the JAVA framework: struts-hibernate-spring.

I am working as a teacher in a computer training center. From my observations on students, SSH is hard to understand, especially Spring. It is said that only people who have just joined the job can use it, people who have to work for three to five years can really understand Spring.
To learn SSH, you must learn: JAVA basics, Servlet, JSP (JS, CSS, HTML ).

To learn about Android, some netizens recommend that you use Java basics-JavaME-Android. But does JavaME need to learn three architectures?

Only JavaME programming is irrelevant to java2EE. you can skip the framework.

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.