Following cord
class OuterOne{
static class NestOne{
static void methodOne(){ System.out.println("One");}
}
}
public class OuterTwo {
static class NestTwo{
static void methodTwo(){System.out.println("Two");}
public static void main(
String[] args) {
OuterOne.NestOne.methodOne();
OuterTwo.NestTwo.methodTwo();
}
}
}
Results
java.lang.NoClassDefFoundError: OuterTwo/NestTwo
Exception in
thread "main"
Java Result: 1
Please expain why RunTimeException