Hi bucky, I was trying out this code but i am getting the output as "You can not enter" for any input given. Please can you help me out what is wrong in the logic?

import java.util.Scanner;
public class apples {
public static void main(String args[]){

int age;
String gender;
Scanner vari = new Scanner(System.in);

System.out.println("Enter gender M/F:");
gender = vari.next();
System.out.println("Enter your age:");
age = vari.nextInt();

if(gender == "M" && age