I have this simple project that I'm sure has come throught here before. I am take input from a user using JOptionPane, make sure it is >15 Chars, and count the uppercase.
Here is what I have so far. I am having trouble setting the first loop correctly.
import java.io.*;
import javax.swing.JOptionPane;
public class WordCount { //using JOptionPane to take input from user and displaying it in dialog box.
public static void main(String[] args)throws IOException {
String userInput;
{
userInput = JOptionPane.showInputDialog(" Please enter your 15 characters: ");
JOptionPane.showMessageDialog(null, "You entered: " + userInput);
}
int len = userInput.length();
while(len < 15){
JOptionPane.showInputDialog(" Please enter at least 15 characters ");
}
}
}