Question about Boolean Operators (Java)
I cannot get this code to run without error. I appreciate any help in this matter. import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner input = new Scanner (System.in); System.out.print(" are you over 18?"); int age = input.Int(); System.out.print("are you a female instrested in birth control?"); String gender = input.String(); if ( age >= 18 && gender == "female") { System.out.print("Welcome to our site"); else System.out.println ("Sorry this site may be inapprobiate for you because it is about birth control"); } } }