Hi, i'm new in java and have a phase of code like this:
import javax.swing.JOptionPane;
public class test
{
public static void main(String[] args) {
String value=JOptionPane.showInputDialog("please input your value");
if (value== "1"){
System.out.println("1");
}else{
System.out.println("not 1");
}
}
}
Question : why every time i put 1,system print "not 1"?
thanks alot