0

When I create array of LinkedList (of Integers) like this,

new LinkedList<Integer>[V];

it gives me error saying "Generic Array creation"

but when I create array like this

new LinkedList[V];

it works fine.

What is this error and what's going wrong here ?

Michael
  • 41,989
  • 11
  • 82
  • 128
Vishwanath
  • 149
  • 2
  • 14

0 Answers0