Created
June 19, 2021 04:18
-
-
Save extsalt/0d072c2aa4204b4ae15f3ba06429b371 to your computer and use it in GitHub Desktop.
How to get input in Java?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jdk.jshell.spi.SPIResolutionException; | |
import java.sql.*; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String... args) throws ClassNotFoundException, SQLException { | |
Scanner scanner = new Scanner(System.in); | |
System.out.println("Enter data : "); | |
String data = scanner.next(); | |
System.out.println(data); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment