Question: . Write a code using the following hints and apply HashMap and its methods get and put for public class CourseInformation (5 marks) (i) Create

. Write a code using the following hints and apply HashMap and its methods get and put for public class CourseInformation (5 marks)

(i) Create a HashMap object called Course to add a key and its value.

//Key is your course name and value is your course code.

(ii) Use put method to map a course name with the course code.

// add any FOUR COURSE NAMES WITH ITS COURSE CODE which are

represented as a String.

(iii) Use get method to find the course code for any one of the course.

// choose a course with your own

don't use main method

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!