hi
have appended the wid your code below
public class capital
{public static void main(String[] args) throws FileNotFoundException
{
// ask the user for...
Type: Posts; User: hope_08
hi
have appended the wid your code below
public class capital
{public static void main(String[] args) throws FileNotFoundException
{
// ask the user for...
Hi
You can define a counter variable "found" before the while loop as int found = 0;
increment it i.e found++ in the if condition.
and outside the while loop put the below condition
if...
Hi
You need to put the statement countryInput.close(); i.e close the scanner after the while loop.
And for displaying the message define a variable found before the while loop as int found = 0;...