I am very new to Java and would ask you for help. I have this:
public class Person {
String name;
String gender;
public static void main(String[] args) {
Person person = new Person();
person.name("Max");
person.gender = "male";
Person person2 = new Person();
person2.name = "Lea";
person2.gender = "female";
}
What should be the correct syntax for the following method? Should I convert String to boolean?
if (String = male) {
System.out.println("You are man!")
} else{
System.out.println("You are woman!")
Thank you!