|
thenks a lot Eranga...
then what should i learn first as a newbie on this language?
Additional:
if i run this simple code of "if then statement" the name Variable is not returning TRUE if i entered a "RODEL". Is "if then statement" is only for numbers?
Thanks in advance...
This is a code:
import javax.swing.JOptionPane;
class DialogBox {
public static void main(String[] args) {
JFrame frame = new JFrame();
String name = JOptionPane.showInputDialog("What is your name:");
if (name == "Rodel") {
JOptionPane.showMessageDialog(frame,"You are " + name);
}
else {
JOptionPane.showMessageDialog(frame,"I Dont Recognize Your Name");
}
}
}
Last edited by rgbosque; 11-29-2007 at 04:15 AM.
Reason: wrong Jave Code Presentation
|