How to call the grand parent constructor from the child ??

Hi All,
I am having 3 classes.
Class A.
Class B extends Class A.
Class C extends Class A
i need to call the constructor of ClassA from Class C. how to call ??
Thanks,
J.Kathir

Each class will implicitly call the parent default constructor if you do not call it in the code ie
super();However you can call any of the parent constructors ie
class Parent {
    int value;
    Parent(int v) {
        value = v;
    public void display() {
        System.out.println(value);
class Child extends Parent {
    Child(int v) {
        super(v);
    public static void main(String[] args) {
        Child c = new Child(10);
        c.display();
}

Similar Messages

  • How to call parent constructor from subtype body ?

    create or replace TYPE person as object(
    p_name varchar2(10),
    p_age NUMBER,
    p_status CHAR,
    p_addr addr_type,
    constructor function person ( p_name char, p_age NUMBER, p_status CHAR, p_addr addr_type ) RETURN SELF AS RESULT
    )NOT FINAL;
    -- subclass
    create or replace TYPE employee under person(
    e_number number,
    hire_date date,
    e_designation varchar2(15),
    constructor function employee ( e_name char, e_age NUMBER, e_status CHAR,
    e_addr addr_type, e_number NUMBER, hire_date date, e_designation CHAR )
    return SELF AS RESULT
    In this scenario how do we call parent constructor from employee type ?

    Can't You write complete example? Tried few variants but get nothing:(

  • How to call the RFC from R/3 to SRM, when we use webdynpro abap? (Urgent)

    Hello
    We use SRM Server 5.5 with classic scenario.
    We want to call RFC in R/3 from webdynpro ABAP.
    How can we do that?
    We are developing the web report using webdynpro abap.
    So we need some of R/3 data such like PR(EBAN)and PO(EKKO,EKPO).
    When user choose the search parameter, report diplay the Shopping cart, PR and PO data on webdynpro.  So we call the R/3 RFC to display the PR, PO data.
    But I tired to call the RFC in R/3, We could not call it.
    How to call the RFC from R/3 to SRM, when we use webdynpro abap?
    Thank you,
    Best Regards,
    SH.

    Hi
    <b>Please look at the following threads as well -></b>
    WebDynpro in SRM
    BAPI's /RFC's in SRM
    BAPI to Change Shopping Cart by RFC
    SRM60 and webdynpro
    Webdynpro Services Exception
    WebDynpro using BAPI has an error
    SRM60 and webdynpro...
    <b>SAP uses META Function modules in SRM to get data from R/3 back-end.</b>
    <u>For getting Purchase requistion data, use the function modules -></u>
    META_REQUISITION_CHANGE        Change purchase requisition              
    META_REQUISITION_CREATE        Create Requisition                       
    META_REQUISITION_DELETE        Delete/close purchase requisition        
    META_REQUISITION_GETDETAIL     Display requisition details              
    META_REQUISITION_GETITEMS      Display requisition items                
    META_REQUISITION_GETRELINFO    Get Releasease Info for requisitions
    <u>For getting Purchase order data, use the function modules -></u>
    META_PO_CREATE                 Create purchase order                    
    META_PO_DELETE                 Delete reservation                       
    META_PO_GETDETAIL              Display purchase order details           
    META_PO_GETITEMS               Display purchase order items             
    META_PO_GETRELINFO             Display purchase order release information
    Hope this will definitely help. Do let me know.
    Regards
    - Atul

  • How to call the DLL writing in Vb6.0 from testsatnd?

    Hi,
    I want to call a dll writting in VB6.0 from teststand. But as i see from the "Step Setting" in teststand, only the C/C++ Dll can be selected in the "adapter" type. I try to use this one as my adapter to call my VB6.0 dll, in result, there is no function can be seen in the "function" tab in teststand.Anyone know how to call the DLL writing in Vb6.0?
    Solved!
    Go to Solution.

    Hi Ivan,
    Just to be sure that your DLL is not wrong
    you have check if all functions are well and present.
    There is  tool called "Dependency Walker"   You can download it at http://dependencywalker.com/ .
    With it you can look "inside" your dll
    If you will see your functions there, you will see them (in my case !!always!!) in TestStand, too.
    Hope this helps 
    Greetings
    Juergen
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=

  • How to call the secured EJB from timer ejb timedout method.

    Hi All,
    I have a couple of questions on EJB 3.1 Timer Service.
    1. How to call the secured EJB (annotated @RolesAllowed) from Timer EJB @Timeout Method?
    2. What's the default role/principal with which the Timer @Timeout Method gets called?
    Please let me know any info regarding the same.
    Thanks,
    Suresh

    I'd start here:
    http://ant.apache.org/manual/index.html
    If that doesn't help, go to the table of contents and start poking around. You don't need to read the whole thing front to back, but if you're not willing to spend some time researching and reading, you're not going to get very far.

  • How to call the css file and its images from our application......

    hai,
    Im uploading a .css file and some images in Apex shared components ,now how to call the css file and images from my Application.... plz tell me detailed.....
    Edited by: anoo on Nov 3, 2008 12:51 AM

    Hi Anoo,
    Sorry, didn't see that you'd started a new thread, so have answered this in 'undefined' is null (or) not an object "
    Andy

  • Is it possible to call a function in a parent component from a child component in Flex 3?

    This is probably a very basic question but have been wondering this for a while.
    I need to call a function located in a parent component and make the call from its child component in Flex 3. Is there a way to access functions in a parent component from the child component? I know I can dispatch an event in the child and add a listener in the parent to call the function, but just wanted to know if could also directly call a parent function from a child (similar to how you can call a function in the main mxml file using Application.application). Thanks

    There are no performance issues, but it is ok if you are using the child component in only one class. Suppose if you want to use the same component as a child to some bunch of parents then i would do like the following
    public interface IParentImplementation{
         function callParentMethod();
    and the parent class should implement this 'IParentImplementation'
    usually like the following line
    public class parentClass extends Canvas implements IParentImplementation{
              public function callParentMethod():void{
         //code
    in the child  you should do something like this.
    (this.parent as IParentImplementation).callParentMethod();
    Here using the Interfaces, we re decoupling the parent and the child
    If this post answers your question or helps, please mark it as such.

  • How to call the BPM objects in the child JSP?

    Hi,
    We are facing some problem, we are trying to use the JSP for the UI instead of BPM Presentation.
    In the JSP we are calling the child JSP(using JSP include), we need to pass the BPM objects from child to parent JSP.
    Can any one help me on how to pass the Object between the JSP's and BPM Obejcts.
    I will explain in the Example too,
    1. We are created the BPM objects with fields
    2. Created 2 JSP's 1. Main.JSP 2. Sub.JSP
    Now we need to call the sub.jsp into main.jsp,while we calling we need to pass the sub.jsp BPM Object.
    Regards,
    Anandh P

    Hi
    When you use <% include page="test.jsp" %> you can use the same object's name in child jsp like in parent file (this is static way to include another file).
    Hope this could solve the problem. regards.

  • How to call a custom controller method from view

    Hi,
    I ve created a simple web service and consumed it in a model. Mapped the input & output parameters to custom controller context which in turn mapped to component controller's context which in turn to view's contexts.
    How to call a custom controller method from view?
    Please explain the syntax.
    Regards,
    Manoj.

    Hi Patralekha,
    Give some idea for the below scenario:
    I ve created a simple web service and consumed it in a model. What I did was
    1) for the input parameters, mapped the node from view->custom controller->model
    2)for the output parameter, mapping from model->custom controller->view.
    It works fine.
    But I don't want to access model nodes directly, rather I want to set the input param in somewhere else (like custom controller) before calling the appropriate method, same for the response also.
    Share me your thoughts.
    Regards,
    Manoj.

  • How to call an external web service from OIM?

    Hi,
    I have a question on how to call an external web service from OIM within e.g. creating user process? How should it be done; through adapter and task in the process?
    Any recomendations?
    Thanks in advance!

    it is not clear to me if you are having problems with calling java code from OIM or if the problem is the web service API.
    Lets do some divide and conquer:
    Can you create a simple java class that just writes a couple of lines to the log? Please attach this code to the OIM task and make sure it runs.
    Once this works we can start looking at the web service call.
    Best regards
    /Martin

  • How to call the webservice in abap program

    Hi All,
    I have created a web service for my RFC .  The RFC has Import and export paramaters.
    I want call the same web service into my  ABAP REPORT and at the same time i want pass the values to webservice  and get the result from webservice in my abap report,
    Please help me  how to call the web service and pass the values and get the values?
    Highly appreciate your assitance.
    Thanks,
    Kishan

    Hi Kishan,
    You can refer to following help document,
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/d005244e9d1d4d92b2fe7935556b4c/content.htm
    Regards,
    Meera

  • How to call the Page Fragment in Page with Flow logic

    Hi,
        I am new to BSP, My requirement is to created 1 page fragment which contains the Logo.  and to create 2 pages in flow logic
    The  logo has to apper in Pages with flow logic Pages. My question is how to call the PAge fragment in the 1 &2 pagesin page with flow logic
    Thanks,
    suresh

    Suresh,
    There is a very enriching portal help.sap.com  where you can find all basic and good documentation .
    http://help.sap.com/saphelp_nw04/helpdata/en/77/8a54d7434ff34784272a3df98ab645/content.htm
    the above link is from that portal.
    Before asking such basic questions please at least try to find or do some research yourself.
    There are standard applications like HTMLB_SAMPLES and SBSEXT_HTMLB and more for sample applications.
    Regards,
    Anubhav

  • How to call the screen in methods could u please explain

    hi,
    how to call the screen in methods could u please explain clearly with example

    HI ,
    CALL SCREEN - Call a screen
    Basic form
    CALL SCREEN scr.
    Addition:
    ... STARTING AT x1 y1 ... ENDING AT x2 y2
    Effect
    Calls the screen scr; scr is the number of a screen of the main program. You use SET SCREEN 0. or LEAVE SCREEN. to define the return from the CALL screen.
    Note
    Please consult Data Area and Modularization Unit Organization documentation as well.
    Addition
    ... STARTING AT x1 y1  ENDING AT x2 y2
    Effect
    The coordinates x1, y1 (start column and start line in the window) and x2, y2 (end column and end line in the window) define the size and position of the CALL screen ("top left - bottom right"). Besides these coordinates, you can also see the contents of the primary window, but cannot perform any action there.
    Note
    If "ENDING AT ..." is not specified, suitable values are substituted for x2 and y2, taking into account the size of the called screen.
    Exceptions
    Non-Catchable Exceptions
    Cause: No further screen level (call screen); the maximum number of nested screen levels is restricted to 50 at present.
    Runtime Error: DYNP_TOO_MANY_CALL_SCREENS
    THX

  • How to call the Application configuration in run time.

    hi guru,
    i have created two  Application configuraton   and it working fine.
    my question how to call the application configuration in run time.
    Example :
    Based on the user i want to change the Application Configuration.like Super user and Normal user.
    Advance thank's
    Regard's
    Vivekanathan.S

    Hi,
    Please try out this way-
    Have a look at this table -
    WDY_CONF_APPLU - (Customizing Data for Web Dynpro Applications).
    after you are done with the configuration--
    Ge the config id for the given application from this table. And depending on the user get an entry from this table and display accordingly.
    Please refer to these links -
    different default layouts for different CONFIG_IDs
    Get WDCONFIGURATIONID
    Regards
    Lekha

  • How to call the Standard Program in our ZPROGRAM?

    Hi Frieds can you tell me the procedure how to call the Standard program
    in z----
    program and we have to get the data from standard one to our customer program.
    Thanks in advance,
    madan mohan.

    Hi,
    *Submit report but export resultant list to memory, rather than
    *it being displayed on screen
    SUBMIT zreport EXPORTING LIST TO MEMORY.
    Once report has finished and control has returned to calling
    program, use function modules LIST_FROM_MEMORY, WRITE_LIST and
    DISPLAY_LIST to retrieve and display report.
    *Example Code (Retrieving list from memory)
    DATA  BEGIN OF itab_list OCCURS 0.
            INCLUDE STRUCTURE abaplist.
    DATA  END OF itab_list.
    DATA: BEGIN OF vlist OCCURS 0,
            filler1(01)   TYPE c,
            field1(06)    TYPE c,
            filler(08)    TYPE c,
            field2(10)    TYPE c,
            filler3(01)   TYPE c,
            field3(10)    TYPE c,
            filler4(01)   TYPE c,
            field4(3)     TYPE c,
            filler5(02)   TYPE c,
            field5(15)    TYPE c,
            filler6(02)   TYPE c,
            field6(30)    TYPE c,
            filler7(43)   TYPE c,
            field7(10)    TYPE c,
          END OF vlist.
    SUBMIT zreport EXPORTING LIST TO MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = itab_list
      EXCEPTIONS
        not_found  = 4
        OTHERS     = 8.
    CALL FUNCTION 'LIST_TO_ASCI'
      EXPORTING
        list_index         = -1
      TABLES
        listasci           = vlist
        listobject         = itab_list
      EXCEPTIONS
        empty_list         = 1
        list_index_invalid = 2
        OTHERS             = 3.
    IF sy-subrc NE '0'.
      WRITE:/ 'LIST_TO_ASCI error !! ', sy-subrc.
    ENDIF.
    Regards
    Sudheer

Maybe you are looking for