-1

I imported the Guava MultiMap library into IntelliJ but when i try to use the MultiMap interface

Multimap<String, BlockingQueue<String>> addBlock = new ArrayListMultimap.create();

the create is not activate. It is coloured in red.

This is the import statement i used

import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
Arthur Decker
  • 1,191
  • 3
  • 15
  • 45

1 Answers1

2

It's a static factory method, not a constructor. Remove the new keyword:

Multimap<String, BlockingQueue<String>> addBlock = ArrayListMultimap.create();
shmosel
  • 49,289
  • 6
  • 73
  • 138
  • Thanks @shmosel this is the first time i am using it, and i clearly over looked the fact that is was a static factory method. – Arthur Decker Sep 13 '16 at 04:21