Java Engineer Interview Questions

30,841 java engineer interview questions shared by candidates

Define a class population with three methods- addPopulation(), printPopulation(), population(). addPopulation() takes two arguments- countryname in the form of string and population as int. It needs to store that value in a single structure. population() takes countryname as input and displays its population. If that countryname isn't present in the list, the output should be zero. printPopulation() prints all the countries with their respective population in tabular form.
avatar

Java Developer

Interviewed at Remaxys

4
Nov 29, 2017

Define a class population with three methods- addPopulation(), printPopulation(), population(). addPopulation() takes two arguments- countryname in the form of string and population as int. It needs to store that value in a single structure. population() takes countryname as input and displays its population. If that countryname isn't present in the list, the output should be zero. printPopulation() prints all the countries with their respective population in tabular form.

Viewing 631 - 640 interview questions

Glassdoor has 30,841 interview questions and reports from Java engineer interviews. Prepare for your interview. Get hired. Love your job.