IDNLearn.com offers expert insights and community wisdom to answer your queries. Find the information you need quickly and easily with our comprehensive and accurate Q&A platform.

Ask the user to input a country name. Display the output the message "I would love to go to [country]"

Sagot :

Answer:

import java.util.Scanner;

public class Country{

public static void main (String[] args){

Scanner input = new Scanner(System.in);

System.out.print("Input a country name: ");

String country = input.nextLine();

System.out.println("I would love to go to " + country);

}

}

Explanation: