Hi guys, can someone please advise me on why this wont work!
Thanks
Thanks
Code:
import java.util.Scanner;
/* This program is from lecture 3, it asks the user for their name, then says hello name
* if that name = lucy then i want it to say something else.
* 19/10/11
* @author ahr */
public class lecture {
public static void main (String[] args) throws Exception {
String name;
System.out.println("Enter your name");
Scanner Scan = new Scanner(System.in);
name = Scan.next();
if (name = 'lucy')
System.out.print("Hi Rucy Roo");
else
System.out.print("hello " + name);
}
}