>To make this method work I have to give it array and object that it will be
>looking for. The thing is I don't know what kind of object in Object [] so I
[quoted text clipped - 5 lines]
>
>Anybody have an idea how to do it?
I suspect you may not need reflection at all.
All you need as a class called KV with two String fields key and
value. You would implement a hashCode and equals method. See
http://mindprod.com/jgloss/hashmap.html
You then can say
map .add ( "LastName", new KV( "LastName", "Robinson" ) )
Or maybe you don't even need that just use String as both key and
value.
HashMap<String,String> map = new HashMap<String,String>( 149 );
map.put ( "LastName", "Robinson" );
String value = map.get( "LastName");

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.