is there a data structure like a set which can take different types as parameters? or do I have to create my own class?
an example to clarify...something like
DataStructure mydatastruct = new DataStructure ()
I'm I asking too much? :P
I meant something like this..I dont know why is not showing like I'm actually writing it
DataStructure <type1, type2, type3,...> mydatastruct = new DataStructure <String, Integer, String> ()
Yes, they are called Generics.
You probably mean the datastructure called
tuple in other languages. They don't exist in Java.
In C++ you have the generic (aka. template) class called
pair which implements your example above for 2 types, but this doesn't exist either in Java. However it is pretty easy to implement it yourself if you need such functionality often.