Answer Posted / ganesh slv
/**
* Printing Stars - 24.03.10
* @author Ganesh
*/
public class Star {
/**
* Please Send me Your Comment - slvganesh.java@gmail.com
*/
public static void main (String arg[]) {
int n = 6;
for (int i=0, j=n; i<=n; i++,j--) {
for (int k=0; k<=n; k++) {
if (i==k || j==k)
System.out.print ("*");
else
System.out.print (" ");
}
System.out.println ();
}
} // Main
} // Class
Is This Answer Correct ? | 17 Yes | 1 No |
Post New Answer View All Answers
What does nextint () do in java?
How to check if linked list contains loop in java?
Which of the classes will have more memory allocated?
Can I use % with real numbers?
What is java util?
How many bytes is a string in java?
How to provide security in java
What is meant by final class?
Why collection is called framework in java?
How many types of the indexof method are there for strings?
How to perform binary search in java?
What is the difference between form & report?
Can we synchronize static methods in java?
Can we clone singleton object?
What is factor r?