Question: 1 . 3 8 Variables, input, and casting ( Java ) import java.util.Scanner; public class BasicInput { public static void main ( String [ ]

1.38 Variables, input, and casting (Java)
import java.util.Scanner;
public class BasicInput {
public static void main(String[] args){
Scanner scnr = new Scanner(System.in);
int userInt =0;
double userDouble =0.0;
// FIXME Define char and string variables similarly
System.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
// FIXME (2): Output the four values in reverse
// FIXME (3): Cast the double to an integer, and output that integer
return;
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!