How to store these values

advertisements

is there type is there to store the value

     <string,string,int>

if i use Namedlist(Solr),List it can be achieved? if so how to use.

Any other way is there?

example:

   <"A",America,code>
   <"B",London,code>

I need this in java

THANKS IN ADVANCE


Why don't you create a Class compose of these datatypes.

Example:

class MyObject
{
    int code;
    String country;
    String Flag;

    // Getters and Setters goes here.
}

Now we can use this class in a List.

List<MyObject> list;