Small trial Sledgehammer (Java)

Source: Internet
Author: User

On the first day of school, feel the time is not enough, a morning to install the idea development tools, to tell the truth than I imagined more complex, first to install JDK,JDK installed after the configuration environment variables, finally download idea, Finally Decipher idea (note here to download the JDK and idea to the official website to download the original, do not go to the third platform to download), of course, I this idiot finally completed the download task under the guidance of the teacher, download play after the feeling I was really too low.

In the afternoon, a class will directly follow the teacher to write code, the simplest,

public class Demo {
public static void Main (string[] args) {
System.out.println ("Hello");

int n1 = 5;
int n2 = 10;
int sum = n1 + n2;

System.out.print ("Computed and:" +sum);

}
}
This is the subject of 5+10=15 and elementary school students.
But I am still a face, only to see the understanding int n1 = 5; int n2 =10;int sum = n1 + n2;
Then the teacher teaches, for example,
This public static void main (string[] args) Because the Java program is called by the JVM virtual machine, the main () function must be public if it wants to be called.

This line of code is the pop-up value, the dead thing to remember on the line, anyway I understand.

System.     out. Print (sum); Get value does not break line

System.  out. println (sum); get the value and break the line

And then run, run the point right-click Run, (the first time to run the best choice here, the teacher taught, hehe.) The teacher also said do not need to know why, according to do it, not so many why, as you learn Mandarin, grow up to understand. Have you ever felt a thief 6)

After a day of learning, feel good, although I know that this learning opportunities are not many, in the study in the next must make good efforts to seize the opportunity, well enrich themselves, refueling!

Small trial Sledgehammer (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.