Java allow one public class per file, and the public class name should be the same with the file name. For you , you should make the filename Appletprac.java
You can see this link Why are filenames in Java the same as the class name?
Write a html file like this:
test.html
<html>
<applet
code = Appletprac.class
width = 200
height = 100>
</applet>
</html>
Put the compiled .class file in the same folder, and input appletviewer test.html
in the cmd.