Hi
I have come across a question in a collection which says:
One can add a reference of a collection to itself. Is it true or false?
I read the explanation that, we can add the reference to the collection to itself, but it results in the stack overflow of the JVM. Please people tell me what is the correct answer, i am confused because we can add the reference but we should not add it.
Please help me
priti_s 0 Newbie Poster
Recommended Answers
Jump to PostHey, thanks, but from exam point of view, what shall i write True or False? From examples it is clear that surely we can add, but it's not recommended, isn't it? So shall i go with option "True"?
You should answer your exam question based upon your understanding of the …
All 4 Replies
Alex Edwards 321 Posting Shark
priti_s 0 Newbie Poster
Alex Edwards 321 Posting Shark
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.