So im learning java,bit by bit im getting a bit more knowledge, now im following tutroials and other webistes ect on learning but im stuck on one problem where i can't figure out what's the problem.
import java.util.Scanner;
class apples{
public static void main(String args[]){
System.out.print("Player Name?");
Scanner name = new Scanner(System.in);
System.out.print(name.nextLine());
System.out.print(" ,how old are you?");
Scanner age = new Scanner(System.in);
System.out.print(age.nextLine());
if (age >= 15){
System.out.println("welcome to Azura World");
}else{
System.out.println("insufficient experience");
}
}
}
from what this should do is,ask the player name, one i type that it should ask name, how old are you? with that at hand, i have the age of the input, there for i want to use it in a if statement but its not working i don't understand why. so please explain if have time.
Also im using THIS as a guide for now