I'm 100% new to Java and am currently doing a course in it. I'm doing a mock up program that tests a users input against a pre-defined code I.E. a password (The numbers from the program Lost), however I am running into difficulties (see below) any help would be greatly appreciated. The main error I'm getting is with the if else statement...
import java.util.Scanner;
public class Lost
{
public static void main( String[] args )
{
String myNumber;
myNumber = "4815162342" ;
// create Scanner to obtain input from command window
Scanner input = new Scanner( System.in );
// prompt user for input and obtain value from user
System.out.print( "Enter numbers..." );
// if...else is nested
if ( result == myNumber );
// if result numbers,
System.out.print( "...You've just saved the world for now!!" );
else
System.out.print( "BOOM!!!!" );
} // end main
} // end class Lost
// put notes here: