import View.UI; public class App { UI m; public static void main(String [] args){ System.out.println(\"Hello\"); UI n ; n.menu(); }}
Th
If you are declaring variables/object inside the method in java you need to initialize it.
In most simple term,
In your case its an object which is accessing a method so if you do not initialize it like
UI n = new UI();
it would give you an NULL pointer exception.
Hope it helps.