Try the following program
public class SamplePgm1 {
/**
* @param args
*/
public static void main(String[] args) {
for(int i = 5; i > 0; i--) {
for(int j = 0; j < i; j++) {
System.out.prin t("+");
}
System.out.prin tln("");
}
}
}...
User Profile
Collapse
-
Please visit
http://www.cs.laurenti an.ca/badams/c1047/eclipse-tutorials/index.html...Leave a comment:
-
Hi,
In java if we gave as Hello h means it just create a reference and not an object. Only after using new only the object fo the class is created.
Hello h; - > Reference
Hello h = new Hello() - > Object...Leave a comment:
No activity results to display
Show More
Leave a comment: