JDoodle

Easy and Quick way to compile and run Java Code Online

Java
Version - JDK 1.8.0_66
Project Name :
Your Code ...
import java.util.Scanner; import java.util.NoSuchElementException; public class MyClass { public static void main(String args[]) { Scanner scanner = new Scanner(System.in); try { System.out.println("Type a Line and enter...."); String txt = scanner.nextLine(); System.out.println("You have typed..."); System.out.println(txt); } catch (NoSuchElementException e) { System.out.println("Type something in the Stdin box above...."); } } }
External Libraries ...
Input Arguments (args of Main Method)...
Result...
compiled and executed in second(s)
Hint - Press Ctrl+Space or Alt+Space for Auto Complete.
Your valuable inputs will help us improve this site
please give your comments. Thanks.
Which language would you like to see next in JDoodle?
Comments/Suggestions/Inputs...
Please Login to use this option....