can someone tell me how can i do arrylist(of three classes) in one class ??
Tuz
0
Newbie Poster
Recommended Answers
Jump to Postplease explain what it is you're trying to do?
Jump to PostWhat do you mean by ArrayList of three classes?
You could create an ArrayList which hold Objects. Or maybe an interface class that the three classes have incommon.
public interface GeneralType { public void someMethod(); } // Use Object as the generic type and cast to …
Jump to Postin which case the first option is the best, since you don't always have access to the classes you need to put in there.
Jump to Post??? you want to do 'what' with them in one class?
Jump to Postthis has nothing at all to do with an ArrayList
just instantiate them and use their methods.
All 31 Replies
stultuske
1,116
Posting Maven
Featured Poster
SasseMan
49
Junior Poster
stultuske
1,116
Posting Maven
Featured Poster
Tuz
0
Newbie Poster
stultuske
1,116
Posting Maven
Featured Poster
Tuz
0
Newbie Poster
stultuske
1,116
Posting Maven
Featured Poster
Tuz
0
Newbie Poster
SasseMan
49
Junior Poster
Tuz
0
Newbie Poster
SasseMan
49
Junior Poster
Tuz
0
Newbie Poster
stultuske
1,116
Posting Maven
Featured Poster
Tuz
0
Newbie Poster
Tuz
0
Newbie Poster
stultuske
1,116
Posting Maven
Featured Poster
stultuske
1,116
Posting Maven
Featured Poster
Tuz
0
Newbie Poster
Tuz
0
Newbie Poster
rushikesh jadha
-6
Junior Poster in Training
stultuske
1,116
Posting Maven
Featured Poster
stultuske
1,116
Posting Maven
Featured Poster
rushikesh jadha
-6
Junior Poster in Training
Tuz
0
Newbie Poster
stultuske
1,116
Posting Maven
Featured Poster
rushikesh jadha
-6
Junior Poster in Training
stultuske
1,116
Posting Maven
Featured Poster
Tuz
0
Newbie Poster
stultuske
1,116
Posting Maven
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.