This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes null pointer exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "null pointer exception" Watch "null pointer exception" New topic
Author

null pointer exception

Muhammad usman shad
Ranch Hand

Joined: Jan 06, 2010
Posts: 30
No error when compile it,
But it does not execute!!!
What is the solution???
sujith Acharya
Ranch Hand

Joined: Dec 25, 2006
Posts: 60
Initializing_Array[] ia = new Initializing_Array[10];


You have created 10 reference of type Initializing_Array
It doesnt mean 10 objects of Initializing_Array.

So you have to create Object and assign to these refence, then only you able to set the values.

like

 
jQuery in Action, 2nd edition
 
subject: null pointer exception