hi kindly tell me why I am getting Nullpointer Exception in following code.
(1) Vector vector=(some resultset from DB);
String str = "";
str = vector.elementAt(0).toString();
==========
Following code not giving exception
(2) Vector vector=(some resultset from DB);
String str="";
str = str+vector.elementAt(0).toString();
Although i have done with coding number (2), but i want to know the technical reason for failure of coding number (1).
Thanks & Regards