Question: Read four strings from input and call printCapital ( ) twice: once with the first and third inputs as arguments, and again with the second
Read four strings from input and call printCapital twice: once with the first and third inputs as arguments, and again with the second and fourth inputs as arguments. public class Capital System.out.printlncapitalname is regionname s capital.";public static void mainString args Your code goes here
Ex: If the input is Montgomery Jakarta Alabama Indonesia, then the output is:
Montgomery is Alabama's capital.
Jakarta is Indonesia's capital.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
