Results 1 to 7 of 7
- 03-22-2009, 02:54 AM #1
Senior Member
- Join Date
- Mar 2009
- Posts
- 552
- Rep Power
- 5
Loop System print or println statements
Is it possible to loop System.out.print or System.out.println statements? I want to create a statement that will send the application back to a certain line of code. Please tell me if this is possible.
Last edited by Singing Boyo; 03-22-2009 at 02:57 AM.
If the above doesn't make sense to you, ignore it, but remember it - might be useful!
And if you just randomly taught yourself to program, well... you're just like me!
-
This smells of spaghetti code and is something that usually should be avoided. Use methods, use looping statements and control of flow statements instead.
- 03-22-2009, 03:35 AM #3
Senior Member
- Join Date
- Mar 2009
- Posts
- 552
- Rep Power
- 5
not spaghetti code...
I have the user enter 3 variables, and if one of these variables is incorrect, I want the user to be able to send the application back to the beginning, allowing them to reenter their variables. Is this possible?If the above doesn't make sense to you, ignore it, but remember it - might be useful!
And if you just randomly taught yourself to program, well... you're just like me!
-
Yes, again use looping statements like a while loop. just avoid goto statements and that sort of rubbish.
- 03-22-2009, 03:39 AM #5
Senior Member
- Join Date
- Mar 2009
- Posts
- 552
- Rep Power
- 5
never used while loops... could you give me an example?
If the above doesn't make sense to you, ignore it, but remember it - might be useful!
And if you just randomly taught yourself to program, well... you're just like me!
-
you certainly can find plenty of examples in the Sun tutorials, examples that have explanation and are much better understood than anything I can create.
- 03-22-2009, 03:52 AM #7
Senior Member
- Join Date
- Mar 2009
- Posts
- 552
- Rep Power
- 5
Similar Threads
-
System.out.println Shortcut
By AdamCCFC in forum New To JavaReplies: 23Last Post: 11-13-2011, 03:45 PM -
difference between system.out.println() & out.println()
By wickedrahul9 in forum Advanced JavaReplies: 5Last Post: 10-18-2008, 11:06 PM -
System.out.println
By Sniper-X in forum Advanced JavaReplies: 10Last Post: 05-05-2008, 03:41 PM -
System.out.println
By sunjavaboy in forum Advanced JavaReplies: 3Last Post: 03-22-2008, 01:30 AM -
Help me with system.out.println
By baltimore in forum New To JavaReplies: 1Last Post: 07-31-2007, 08:30 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks