A fun, simple solution:
for (int i = 0; i < 5; i++)
System.out.println(" *********".substring(i, 5 + 2*i));
More Related Contents:
- How to compare variables in a loop, java
- Basic Looping in Java
- Nested for loop in java. Am I allowed to declare a variable in the outer and increment it in the inner?
- Why is printing “B” dramatically slower than printing “#”?
- How does a for loop work, specifically for(;;)?
- Is there a way to access an iteration-counter in Java’s for-each loop?
- A for-loop to iterate over an enum in Java
- How to efficiently remove all null elements from a ArrayList or String Array?
- Is there any way to do n-level nested loops in Java?
- Post increment operator not incrementing in for loop [duplicate]
- Null check in an enhanced for loop
- Breaking out of a for loop in Java [closed]
- Using for loop inside of a JSP
- Java: For-Each loop and references [duplicate]
- What is the value of the variable result after the following code is executed?
- Java while loop query [closed]
- Looping for a random number of times java
- How to end while loop in Java
- I keep getting java.lang.ArrayIndexOutOfBoundsException: 5! How do I fix this? [closed]
- Creating a program to file criminal cases and then view them, with new case being allowed to add
- Even Factorial Method in Java. I have tried everything and can’t figure it out
- Java number sign and asterisk [closed]
- How to loop through a HashMap in JSP?
- java.lang.IllegalStateException: Scanner closed
- What does the colon (:) operator do?
- break a loop if Esc was pressed
- Loop diagonally through two dimensional array
- Java: Array with loop
- Java Iterate Bits in Byte Array
- Make a upside down triangle in java