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
How many characters is 16 bytes?
What are methods of a class?
What is the difference between java applets and applications?
How the interruptible method gets implemented?
What is style and indentation?
Can we use different return types for methods when overridden?
Why we use protected in java?
What is empty list in java?
What is the function of static in java?
What do you mean by hashing?
What is anagram number?
What is the access scope of protected access specifier?
What is the base class of all exception classes in java?
How many bits is a word?
What is an interoperable application in java ?