Ask your own question, for FREE!
Mathematics 11 Online
OpenStudy (mimi_x3):

java

OpenStudy (mimi_x3):

I have a private linkedlist in one class, and have a public function for that linkedlist in that class how do i access it from another class

OpenStudy (anonymous):

delete this and post it in CS section u attention seeking whore

OpenStudy (ikram002p):

U can reach the function only that is in public

OpenStudy (ikram002p):

U can call it by the class name and the public function

OpenStudy (mimi_x3):

how would i print it out

OpenStudy (mimi_x3):

I have this public LinkedList<Crap> getCrapList() { return getCrapList; }

OpenStudy (mimi_x3):

public LinkedList<Crap> getCrapList() { return craps; }

OpenStudy (mimi_x3):

I want to return everything in the linkedlist list

OpenStudy (mimi_x3):

from the main class

OpenStudy (mimi_x3):

private LinkedList<Crap> craps; public LinkedList<Crap> getCrapList() { return craps; }

OpenStudy (ikram002p):

So class name is carp so just do this getCraplist.Crap()

OpenStudy (mimi_x3):

i want to access it from an upper class

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!