Jump to content

Recommended Posts

Posted

Java question that i will spam until someone answers me :)

 

 

I have this

class Parent{

bleh bleh..

}

Interface gg{

public void example();

}

class BallsofSteel extends Parent implements gg{

public void example(){

s.o.p("actually is setekh");

}

}

class mxc{

BallsofSteel e1=new BallsofSteel();

e1.example();

}

 

And here is the shit.

BallsofSteel considers 'example()' as Parent class extend, and gives compilation error on that, since it's not existant in parent(which i obviously dont want to implement, and it's not abstract)

 

So, can i make this shitty Interface thing work first, other than casting the object( something i get 2 options to to- BallsofSteel or the Interface gg)

 

 

if you have any experience over that :) the internetz wasnt very helpful( not many examples of combining both class and interface in another class, and my specific problem.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock