+ 4
How to create a Java Program with two classes in the playground
I have a Test-class that creates different instances of my OBJECT-class, but if I run the program it cant find the OBJECT-class. Besides: I have to put the classes separated because of an Interface I'm using.
3 Answers
+ 12
You have to put them in one file at playground, like fghhj said, before he edited his post :D
+ 9
You mean in playground or ide?
Ide: You have to import your class to the class where it is used, if it is stored in another package:
import mypackagePath.myClass;
Make sure your .java file is named like your class, e.g. myClass.java
- 2
oh