(1) Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output those four values on a single line separated by a space.
Enter integer:
99
Enter double:
3.77
Enter character:
z
Enter string:
Howdy
99 3.77 z Howdy
import java.util.Scanner;
public class BasicInput {public static void main(String[] args) {Scanner scnr = new Scanner(System.in);int userInt;double userDouble;// FIXME Define char and string variables similarlySystem.out.println("Enter integer:");userInt = scnr.nextInt();// FIXME (1): Finish reading other items into variables, then output the four values on a single line separated by a space
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here