Creating a text based game. I have a method for each of the following: Race, profession, name.
So for instance:
public static void main(String[] args) {
// TODO code application logic here
intro();
name();
System.out.println("Welcome " + name);
}
public static void String name(){
System.out.println("Enter Name:");
String name = sc.next();
return name;
}
Yet I get an error when using the name variable in my print in main. Why?