In the code given below, eventhough the variables i and sampleString is declared as private the same is accessable directly from the object through the main method of
test class. Does it mean that private/protected declaration is ignored within the class?
public class Test {
private int i = 25;
private
String sampleString = "Arun";
public static void main(String[] args) {
Test test = new Test();
System.out.println("String is --" + test.sampleString);
System.out.println("Int value is --" + test.i);
}
}