hy im having a little problem with a loop with jgrasp here is my basic program
import javax.swing.JOptionPane;
public class loops1
{
public static void main (String[]args)
{
String name
do
{
String name = JOptionPane.showInputDialog ("who is the cleverest person in the room?");
}
while (name != "erin");
}
}
ok so i declared the varible name outside so it can pick it up but it keeps giving me an error message saying name has already been declared What am i doing wrong?