Training For
Training For
Question 1
class Main {
int n = 4;
System.out.println("Java is fun");
}}}
Output
Java is fun
Java is fun
Java is fun
Java is fun
Question 2
System.out.println(i);
Question 3
}
Question 4
Write a program to print numbers from 1 to 10.
Question 5
Write a program to calculate the sum of first 10 natural number.
Question 6
(int i = 0; i < 5; ) {
System.out.println( );
}