need help getting nested statements to work. There seems to be a problem with being able to convert the input. I started learning Java 2 days ago so I am a newb but I have programmed in C++ for a couple of years. It says it cannot convert string to booleen. This is also an applet. Please help me.
import javax.swing.JOptionPane; // import class JOptionPane
public class Password
{
public static void main( String args[] )
{
String casino;
Object bet;
String option;
int number1;
int number2;
int number3;
String firstnumber;
String secondnumber;
String thirdnumber;
// read in first number from user as a string
casino = JOptionPane.showInputDialog( "Enter password" );
if
(casino==casino)
{
JOptionPane.showMessageDialog(null,
"Incorrect Password"
);
if(casino.equals(casino))
{
option = JOptionPane.showInputDialog("Enter an Option");
number1 = Integer.parseInt(firstnumber);
if(option=1)
{
JOptionPane.showMessageDialog(null,"You have $500");
}
if(option=2)
{
JOptionPane.showMessageDialog(null, "You have $500, Enter your bet");
}
bet=JOptionPane.showInputDialog(bet);
if(bet<500)
{
JOptionPane.showMessageDialog(null,"Deal cards for Poker");
}
else
JOptionPane.showMessageDialog(null,"You don't have enough money");
}
if(option=3)
{
JOptionPane.showMessageDialog(null,"Thank you for Choosing Java Casino");
}
}
System.exit(0);
}
}
