0

How do l make a user make a decision? Using java

26th Jan 2020, 10:30 PM
Alpha Shawn
Alpha Shawn - avatar
3 Respostas
0
java
26th Jan 2020, 10:53 PM
Alpha Shawn
Alpha Shawn - avatar
0
https://www.programiz.com/java-programming/basic-input-output import java.util.Scanner; class Input { public static void main(String[] args) { Scanner input = new Scanner(System.in); // Getting float input System.out.print("Enter float: "); float myFloat = input.nextFloat(); System.out.println("Float entered = " + myFloat); // Getting double input System.out.print("Enter double: "); double myDouble = input.nextDouble(); System.out.println("Double entered = " + myDouble); // Getting String input System.out.print("Enter text: "); String myString = input.next(); System.out.println("Text entered = " + myString); } }
26th Jan 2020, 11:10 PM
Fernando Pozzetti
Fernando Pozzetti - avatar