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
        System.out.println("Welcome " + name);

    public static void String name(){
        System.out.println("Enter Name:");
        String name =;
        return name;

Yet I get an error when using the name variable in my print in main. Why?

Your method name() is void, so it doesn't return anything.

Actually its not void. Thats a typo in their.

maybe try declaring name = name(); Is it the actual name variable that is causing issues?

Yup that worked. Thank you!