Predict the output of following Java program? class Test { int i; } class Main { public static void main(String args[]) { Test t; System.out.println(t.i); … Read More
Tag Archives: Java-Class and Object
In Java, methods and data members can be encapsulated by the following four access modifiers. The access modifiers are listed according to their restrictiveness order. 1)… Read More