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.
|