import java.util.Scanner;
public class Checkdate {
    private static Scanner mon;
    public Checkdate(String x) {
        if (x == "feb") {
            System.out.println("lol");
        }
        else {
            System.out.println("rofl");
        }
    }
    public static void main(String args[]) {
        String g;
        mon = new Scanner(System.in);
        System.out.println("Enter string");
        g = mon.next();
        final Checkdate che = new Checkdate(g);
    }
}
this is just a simple program..even if i enter feb it shows rofl..i cant figure out whats wrong please help...
 
    