I have following class:
public class SomeClass {
public static void main(String[] args) {
//
}
private static void test() {
MyClass myClass = new MyClass(); //Doesn't work
myClass.print(); //Doesn't work
class MyClass {
void print() {
System.out.println("Some text");
}
}
}
}
How to create an object of type MyClass? Both lines produce compilation error.