with the beginning of sophomore year, we also began to contact a new programming language--java
when the class made a fool, did not keep up with the teacher's explanation, in their own operation some confused, fortunately, the teacher patiently explained.
I succeeded in compiling a few small programs.
public class Hello {public
static void Main (string[] args) {
System.out.println "Hello! Java ");
}
}
public class Sum {public
static void Main (String args[]) {
int i, sum = 0;
for (i = 1; I <= i++) {
sum = i;
}
SYSTEM.OUT.PRINTLN (sum);
}
public class Temp {public
static void Main (String args[]) {
int a = 2, b = 3;
System.out.println ("Initial A's value is" + a);
System.out.println ("Initial B's value is" + B);
int temp;
temp = A;
A = b;
b = temp;
System.out.println ("The value of a after the exchange is" + a);
System.out.println ("The value of B after swap is" + b);
}
}
First of all, in the absence of a good preview of the situation, to understand its face object characteristics of this is still some difficulties, the teacher's patience to explain and look at the textbook, finally is more understandable. This training is some basic things, but also happy to find it with C as a programming language in common. But the cross-platform nature of Java is unmatched by other languages.