Search:

Type: Posts; User: GoodbyeWorld

Search: Search took 0.11 seconds.

  1. Replies
    3
    Views
    1,278

    Re: Why doesn't java allow generic arrays?

    It kind of does, but wouldn't the type-safe flaw also apply to the toArray() method that returns an array of type Object? Wouldn't that be risky too? Yet Java has that in its API. C++ does...
  2. Replies
    3
    Views
    1,278

    Why doesn't java allow generic arrays?

    I can have a template class of type T in C++, just like java, but in C++ I can do this


    T[] array = new T[9];


    in java, if I do that, I get an error saying that I'm not allowed to use generic...
Results 1 to 2 of 2