JAVA
java
1
2
3
4
5
6
7
8
9
10
11
import java.util.Scanner;
public class MyClass {
public static void main(String[] args) {
Scanner sc= new Scanner (System.in);
System.out.print("Input your first name: ");
String fn= sc.next();
System.out.print("Input your last name: ");
String sn= sc.next();
System.out.println();
System.out.println("Hello \n"+fn+" "+sn); } }
//do like this you will get your desired output
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run