Question: What is the error with the following code. Fix the code so it will be able to run. import java.util.Scanner; public class Text5{ public static
What is the error with the following code. Fix the code so it will be able to run.
import java.util.Scanner;
public class Text5{ public static void main(String[] args){ Scanner scnr = new Scanner(System.in); String one = ; String two = scnr.nextLine(); System.out.println(one); // Hint, you can use concatenation of the two variables } }
Input: Bye!
Output: Hello one! Bye!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
