Search:

Type: Posts; User: PhHein

Search: Search took 0.12 seconds.

  1. Thread: What's wrong?

    by PhHein
    Replies
    39
    Views
    2,847

    Re: What's wrong?

    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.
  2. Thread: What's wrong?

    by PhHein
    Replies
    39
    Views
    2,847

    Re: What's wrong?

    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,...
  3. Thread: What's wrong?

    by PhHein
    Replies
    39
    Views
    2,847

    Re: What's wrong?

    No, about this:
    String [] books2;
  4. Thread: What's wrong?

    by PhHein
    Replies
    39
    Views
    2,847

    Re: What's wrong?

    Where did you initialize books2 ?
  5. Thread: What's wrong?

    by PhHein
    Replies
    39
    Views
    2,847

    Re: What's wrong?

    please repost using code highlighting. Announcements - What's Wrong With My Code?
Results 1 to 5 of 5