GUVI
Back

Problem regarding Enum

Created 2 years ago
129 Views
8 Comments
Ankush_253
@Ankush_253
Ankush_253
@Ankush_253Profile is locked. Login

Read the question below :

“Write a enum that will have zip codes and write a program that will get a zip code and print the corrosponding city name.”

My problem is that I can successfully execute a program which will get a city name and print the corresponding zip code but not the vice-versa. Neither could I write zip codes (or Integer values) in the enum block. To be precise, I am able to write : New Delhi(110001), but not 110001(New Delhi)

Please help.

Comments (8)
Please login to comment.
 
Powered by habitate.io Habitate