Results 1 to 4 of 4
- 03-07-2011, 09:06 PM #1
Member
- Join Date
- Mar 2011
- Posts
- 11
- Rep Power
- 0
Why won't my print statements show up?
None of my print statements are showing up in the output, except for the very last one. Anyone know why?
Here is the code:
// Chris Gipple Lab 4
public class LAB4A {
public static void main(String[] args) {
onestep();
}
public static void onestep(){
int jtot=5;
for (int j=1; j==jtot; j++){
for (int i=0; i < (jtot-j)*5; i++){
System.out.print(" ");}
System.out.print(" o ******");
System.out.println();
for (int i=0; i < (jtot-j)*5; i++){
System.out.print(" ");}
System.out.print(" /|\\ *");
System.out.println();
for (int i=0; i < (jtot-j)*5; i++){
System.out.print(" ");}
System.out.print(" / \\ *");
System.out.println();
}
System.out.println("****************************** **");
}
}
- 03-07-2011, 09:10 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
- 03-07-2011, 09:11 PM #3
Senior Member
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 780
- Rep Power
- 4
Yes :
loop while 1 == 5 --> never :)Java Code:for (int j = 1; j == jtot; j++)
The for Statement (The Java™ Tutorials > Learning the Java Language > Language Basics)
- 03-07-2011, 09:17 PM #4
Member
- Join Date
- Mar 2011
- Posts
- 11
- Rep Power
- 0
Similar Threads
-
how to show web browser in mobile app or is it possible to show it in textArea
By Basit781 in forum CLDC and MIDPReplies: 3Last Post: 05-27-2010, 10:54 AM -
The code isnt working unless I add print statements at diffrent points!:confused:
By Addez in forum New To JavaReplies: 6Last Post: 11-12-2009, 10:50 AM -
Loop System print or println statements
By Singing Boyo in forum New To JavaReplies: 6Last Post: 03-22-2009, 03:52 AM -
Print the text file and print preview them
By Java Tip in forum java.awtReplies: 0Last Post: 06-22-2008, 11:04 PM -
netbeans 6.0 not show commpunent or show blank page
By fahimaamir in forum NetBeansReplies: 1Last Post: 01-26-2008, 06:20 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks