What is UserInput.prompt?
Use Scanner to get input from the user, unless you were directed otherwise by your instructor. For example,
Scanner userInput = new Scanner(System.in);
//System.in is connected to the keyboard by default, so the statement above will create a Scanner object called userInput that allows you to read in input. Google "Java Scanner" to see the methods it supports.
Also, friendly tip: post as many details as necessary, but don't post more. Try to identify the problem & if you can't fix it, post it on here. If you can't identify the problem, fine, just post your code and post the errors you are getting.