There are two issues.
-
Update the
getFacebookContent()
method inFacebookPerson
to return the content usingfb
object as below.public String getFacebookContent(){ return fb.getContent(); }
-
Implement
getContent()
method inFacebook
as below:public String getContent(){ return content; }
In addition, you may want to initialize content
variable as Initial_Content
instead of null
as you are expecting in the output.
2
solved Java code making error [closed]