Exam Fever - Java programs and quiz
Thursday, December 13, 2012
Simple Array, Simple Forloop
Printing numbers by using array and forloop methods in Java
Java Code:
public class I_C_6 {
public static void main(String[] arg) {
int[] numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9};
for (int i = 0; i < 9; i++) {
System.out.println(numbers[i]);
}
}
}
Screenshot:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment