I have a problem making a program that uses the type String. I want my program to make a loop if the user don't enter his first name.
public class formregister {
public static void main(String[] args) {
String nama_depan = jTextField_FN.getText();
do
{JOptionPane.showMessageDialog(null,"Add your first name");
} while (first_name.equals(""));
How can I check if the user entered his first name and then proceed to another step, like asking for his last name?