The private keyWord denotes that the field or method is hidden from view of any other class.
class MyClass {
private int n; // n cannot be accessed by any class except MyClass
private void doSomething(){} // doSomething cannot be accessed by any class except MyClass
}
Copyright © 2026 eLLeNow.com All Rights Reserved.