Remove package declaration at the top of the code.
then create a file named as NumberToString.java and save it in a folder.
Next go to the file location using cmd and type javac NumberToString.java
then enter
if u havent got any error, type java NumberToString
hit again enter