VOOZH about

URL: https://www.geeksforgeeks.org/java/enummap-get-method-in-java/

⇱ EnumMap get() Method in Java - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

EnumMap get() Method in Java

Last Updated : 13 Jul, 2018
The Java.util.EnumMap.get(Object key) method in Java is used to give the mapped value of the specified key. Syntax:
get(Object key)
Parameter: The method takes one parameter key which is passed to return the value associated with it. Return Value: It returns the value mapped with the associated key. Below programs illustrate the working of get() function: Program 1:
Output:
GeeksforGeeks ranked in India: 72
Program 2:
Output:
Visitors in United_States: 18.2%
Comment