Search:

Type: Posts; User: Norm

Search: Search took 0.19 seconds.

  1. Replies
    5
    Views
    443

    Re: Accessing another abstract class's variable?

    Create an instance of the B class and use the reference to that instance to call the method:

    SomeClass smCls = new SomeClass(); // create an instance and save reference to it
    ...
  2. Replies
    5
    Views
    443

    Re: Accessing another abstract class's variable?

    The compiler can not find a method named getNum that is defined in the class A.

    Make sure the method is defined in the class before trying to call it.

    In the posted code, getNum is defined in...
  3. Replies
    5
    Views
    443

    Re: Accessing another abstract class's variable?

    If you are getting compiler error messages, please copy them and paste them here.

    Please edit your post and wrap your code with code tags:



    **YOUR CODE GOES HERE**


    to get highlighting...
Results 1 to 3 of 3