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 bitwise or mean?
What is contract between hashcode and equal method?
What is anti pattern in programming?
What is purpose of find feature?
What is return in java?
What is arraylist e in java?
What is jvm? Why is java called the platform independent programming language?
How will you serialize a singleton class without violating singleton pattern?
What is the difference between logical data independence and physical data independence?
What is return keyword in java?
What is map and hashmap in java?
Why constructor has no return type?
Can we have multiple classes in a single file?
How to split arraylist elements in java?
How to compare two strings in java program?