X1126: Adding to Maps - Even and Odd

Complet this method to Add the numbers 0-9 as keys to the map. If the key is even, the value for that pair should be true. If the key is odd, the associated value should be false. Finally, the Map should be returned.

For example:

  • If the key is the number 2, the value should be true.
  • If the key is the number 3, the value should be false.

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.