Private

From Abap2Java

Jump to: navigation, search

ABAP

see PRIVATE SECTION

Java

Attributes, methods and constructors defined with the modifier private are only accessible inside the class that they are defined in.

public class A {
   private int val;
   public int getVal( ){ return val; }
   private void do_this( ){...}
}

public B {
  private int val;  
  public void do_that() {
    A a = new A();
    this->val = a.val;        //not possible
    this->val = a->getVal( ); //possible
    a->do_this( );            //not possible
  }
}

See also:
Object Orientation, visibility, modifier, public, protected

Personal tools