SyntaxFix
Write A Post
Hire A Developer
Questions
Put your code in a method.
Try this:
public class MyClass { public static void main(String[] args) { UserInput input = new UserInput(); input.name(); } }
Then "run" the class from your IDE