+ 1

What is "no such element exception"

import java.util.Scanner; class MyClass { public static void main(String[ ] args) { Scanner sc = new Scanner(System.in); String fn = sc.next(); String sn = sc.next(); String name; name = fn + sn; System.out.println("name"); } }

7th Apr 2018, 8:39 AM
Ayo Sam
Ayo Sam - avatar
1 Odpowiedź
+ 5
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 https://code.sololearn.com/cQ3ywYHsldC2/?ref=app
7th Apr 2018, 8:55 AM
GAWEN STEASY
GAWEN STEASY - avatar