Questions


June 2021 2 30 Report


Question: Hello Capitals

You and your friends want to travel the capitals of 10 countries. The problem is, you and your friends are not good at geography. You are asked to write a program that will tell you the capital you want to visit. Here are the list of 10 countries, with their capital city:

Sweden: Stockholm

Australia: Canberra

New Zealand: Wellington

Netherlands: Amsterdam

Canada: Ottawa

Norway: Oslo

Jordan: Amman

Finland: Helsinki

Romania: Bucharest

Columbia: Bogota

Write a method Met that takes as parameter a String and prints the capital of the country.

Only write the method - assume that the Class & main method have been defined.

Use the System.out.println() statement for printing.

Example Input: Sweden
Output: Stockholm
Example Input: Canada
Output: Ottawa

Answers & Comments


Add an Answer


Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Helpful Social

Copyright © 2024 EHUB.TIPS team's - All rights reserved.