The first day of learning Java

Source: Internet
Author: User

Simple rough point, the novice in learning Java, I think the most important thing is to play more practice, because especially for self-study students, generally with the help of textbooks or video, understand is one thing, their operation is another matter. Today in the subway to see the video, feel very simple, come back at night, I would like to try. Here are the steps:

Tools are not recommended, so create a new Notepad. txt--name (. java)--name. Class

There is a problem with naming, because the Win7 system's Notepad does not display the extension, and the toolbar is not found, do not know where to hide.

So, if you are a classmate of Win7, and you cannot find the toolbar, the following steps: View, folder and search options, top right corner, check box, hidden extensions

Java program Development Three-step walk: Writing source program, translation source program, run

So, first change the Notepad extension to. java

Comments:

Single-line comments start with//, multiline comments:/* */

Commonly used control output characters:

\ t Output 8 spaces

\ nthe line break

Declare variables in Java:

1, the data type 2, the variable name 3, the value of the variable

public class test{

public class static void Main (String[]args) {

int number=3;

SYSTEM.OUT.PRINTLN (number);

}

}

The first day of learning 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.