Search:

Type: Posts; User: Gugubo

Search: Search took 0.15 seconds.

  1. Replies
    6
    Views
    1,048

    [SOLVED] Re: Changing whole array

    I tried your suggestion in post 4, but apparently I typed it in a bit wrong.

    Tried it again and it works. Thanks!
  2. Replies
    6
    Views
    1,048

    [SOLVED] Re: Changing whole array

    Maybe I'll rephrase.

    So this is my code:


    String[] stringArray = {"hello","world","test","whatever"};
    System.out.println("stringArray: "+ java.util.Arrays.toString(stringArray));...
  3. Replies
    6
    Views
    1,048

    [SOLVED] Re: Changing whole array

    Eclipse gives an error: "Array constants can only be used in initializers." in this line:

    stringArray = {"banana","fish","tree","apple"};
  4. Replies
    6
    Views
    1,048

    [SOLVED] Changing whole array

    How can I change a complete array when it's already initialized?

    Can I change this array:

    String[] stringArray = {"hello","world","test","whatever"};

    to this:
    ...
Results 1 to 4 of 4