Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

About the A Class

  Asked By: Gail    Date: Aug 02    Category: Java    Views: 592

class A {
int test() { return 1; }
class B {
int test() {return 1; } // I added this line.

public class C extends A.B {
C(A a) {

It gives error because of extending the C class with A.B.. And for sure we
don't have test() function in B class..

Also if you don't add that line and extend C class from only A than.. You
will get the compile error that A is not a inner class.. It means "probably"
you can not call the Object class (the mother class) implicitly..



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on About the A Class Or get search suggestion and latest updates.