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)