chandru.in
In the zone
Why will I answer same question again within the same page? If he can't read others' reply why post?
for(int i=0;i<10;i++)
for(int j=0;j<10;j++)
{
xyz[i] = new B();
xyz[i].abc[j]=temp;
}
Thanks Bandu,^Your xyz array is only "declared" to be of type B and size 10. You haven't initialized it yet. So, when you try to use it, you face a nullpointer exception. I guess at the very first iteration of the loop (when i = 0). Assign 10 B objects to each of the xyz array elements and you should be fine.
Code:for(int i=0;i<10;i++) for(int j=0;j<10;j++) { xyz[i] = new B(); xyz[i].abc[j]=temp; }
i just gone through wrapper classes
Integer, Byte, and etc are wrapper classes.
they do have some functions and there objects can be created simply like other classes...
WHAT I DONT UNDERSTAND ABOUT KEYWORD 'int' IS WHAT XACTLY IS THE MEANING, USE AND ITS RELATION TO INTEGER CLASS....
please reply and if u do have any notes about this plz send it to me at c2tarun@gmail.col
THANK YOU
There is no way they can be reported to be equal. Are you sure?Still the objects are reported to be equal!! Why is that so??