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
Why is multithreading important?
What is __ init __ functions?
How can we achieve thread safety in java?
How many bits is a string in java?
When is the garbage collection used in Java?
How do you compare two objects?
What ide should I use for java?
Can we have this () and super () together?
How java uses the string and stringbuffer classes?
Why does java does not support multiple inheritance? Explain
What is complexity in java?
What is difference between iterator access and index access?
What is runtime polymorphism or dynamic method dispatch?
Which keyword specify that a variable is effectively final ?
What is method reference?