Well you cannot assign a String to an int array (which is also null). You can only assign a String to an index of a String array, which is not null.
Type: Posts; User: PhHein
Well you cannot assign a String to an int array (which is also null). You can only assign a String to an index of a String array, which is not null.
That's a huge difference! books2 is a cupboard that has drawers. Each drawer can hold a String.
books2[i] = scan3.nextLine(); Says: put this String into drawer at index i. But you've never built,...
No, about this:
String [] books2;
Where did you initialize books2 ?
please repost using code highlighting. Announcements - What's Wrong With My Code?