View Single Post
Old 10-22-2011, 01:25 AM   #3
a.oprea
Registered User
 
Join Date: Jul 2011
Posts: 49
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String x;
System.out.print("Input text -> ");
x = scan.nextLine();
while(x.length() < 3 || x.length() >20) {
System.out.print("Word length must be between 3 and 20 -> ");
x = scan.nextLine();
}
System.out.println("Text length: " + x.length());
}

Something like this i asume?
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
a.oprea is offline   Reply With Quote