Im having problems when trying to initialize the variable:
Map<Sentence, Float>[] vectorValueSentences; // this is ok
/* but this is not */ vectorValueSentences = new HashMap<Sentence, Float>()[100];
I search on what to do but i didnt find any. I read that the object to be initialize has to be static but i dont find a way to declare the Map static.
Thank you for your help!
Ezequiel Santiago SánchezEzequiel Santiago Sánchez
asked Oct 10, 2015 at 19:19
1 Answer 1
HashMap<Sentence, Float>[] vectorValueSentences = new HashMap[100];
answered Oct 10, 2015 at 19:37
Sign up to request clarification or add additional context in comments.
1 Comment
Ezequiel Santiago Sánchez
Wooooooow, thank you! I can believe it was so simple and yet couldn't find it anywhere. Deepak Marathe, you are great :)
Explore related questions
See similar questions with these tags.
lang-java
vectorValuesSentences
is not declared before calling the linevectorValueSentences = new HashMap<Sentence, Float>()[100];
, obviously its wrong