I’m looking for a Java native object which has two strings attributes.
What i would like to obtain is :
MagicObject myObj = new MagicObject();
myObjet.setFstAttributes("str1");
myObjet.setScdAttributes("str2");
Could you notice me an Object to use ? (An object which is in the java util or other)
Thanks for your help,
jérémy
If you are using Java 6 or higher, Check out
AbstractMap.SimpleEntry. In your example, you’d want aAbstractMap.SimpleEntry<String, String>.