IMPLEMENTATION

From Abap2Java

Jump to: navigation, search

ABAP

Keyword that is used in combination with the CLASS keyword. After CLASS cl_my_class IMPLEMENTATION, the implementation of the class follows. The definition of the class on the other hand is done after CLASS cl_my_class DEFINITION.

CLASS B DEFINITION INHERITING FROM A.
  PUBLIC SECTION:
    DATA a TYPE I.
    METHODS do_this REDEFINITION.
ENDCLASS.

CLASS B IMPLEMENTATION.
  METHOD do_this.
    WRITE 'anything'.
  ENDMETHOD.
ENDCLASS.

Java

In Java, the definition and the implementation of a class is not separated.

class b extends a{
  public int a;
  public void doThis( ){            //definition of the methodh
    System.out.print( "anything" ); //directly followed by implementation
  }
}
Personal tools