How do i use Map in Processing?

I have this code: private Map<Integer, Color> Colours; and i get this error: Cannot find a class or type named “Map” I had a similar problem with using a Scanner but managed to fix that by including: import java.util.Scanner; Thinking the solution to this may be similar.

Answers

  • Solution found for anyone in future, add this line to the start of your processing file.

    import java.util.Map;

Sign In or Register to comment.