Answers for "how to take in input from user java"

7

how to input in java

import java.util.Scanner;
...
  Scanner console = new Scanner(System.in);
  int num = console.nextInt();
  console.nextLine() // to take in the enter after the nextInt() 
  String str = console.nextLine();
Posted by: Guest on January-05-2020

Code answers related to "how to take in input from user java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language