/* This is a comment that spills
over to the next line */
int i = 5; /// This is an inline comment.
long j = 10;
int i = (long) j;
void computeStuff ()
{
int k = 5;
int s = 0;
for (int i=0; i< i++) {
int m = 3; // Will this compile?
s = k + i*m;
}
}
String hello = "hello";
String world = new String ("world");
int[] A = new[10];
boolean flag;
if (flag = true) {
// ...
}
In-Class Exercise 2:
Download and modify this Java program
print out patterns that look like this (when N=5):
1
2 1
3 2 1
4 3 2 1
5 4 3 2 1