I am trying to have name of contacts in one array and their types in another array,but can\'t get through with null pointer exception.here is my code.I have pointed out the
You're not initializing your String[] name, so when you try to access it, you get a null pointer exception. I would suggest using more meaningful variable names. 'name' is very ambiguous.