Results 1 to 2 of 2
Thread: string length HELP PLZ!!
- 09-23-2010, 05:57 AM #1
Member
- Join Date
- Sep 2010
- Posts
- 1
- Rep Power
- 0
string length HELP PLZ!!
im a beginner to Java language:
i need to prompt the user to enter their name. then i need the program to print that name once for every letter in the name. im not sure how to set this up though i do know i need to use a loop and the string length comes into play,anyone plz help. i also need to prompt the user user to enter an even number after their name loop ends and if they dont enter an even number the loop needs to continue asking for one until they do if anyone can help with these questions that would be helpful.
-
To solve your first problem, please read up on for loops here: the for loop
To solve the second, please read up on while loops here: The while loop
Best of luck and welcome to the forum!
Similar Threads
-
How can I restrict the length of string in JTextField?
By vicks.very.cool in forum AWT / SwingReplies: 4Last Post: 07-29-2010, 05:34 PM -
Validating for length of String
By Bascotie in forum New To JavaReplies: 1Last Post: 10-11-2009, 11:45 AM -
Using PadRight but want to actually cut the string off at that length
By matpj in forum New To JavaReplies: 1Last Post: 01-14-2009, 05:19 PM -
[SOLVED] String Length issue.
By ChrisMayhew in forum New To JavaReplies: 7Last Post: 01-11-2009, 03:16 AM -
Finding the exact length of a string in a JLabel (in pixels)
By Clarkey in forum Advanced JavaReplies: 2Last Post: 03-25-2008, 05:49 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks