alexlorenlee / JavaTutorialCode

Here is all the code from my videos
144 stars 105 forks source link

String input from User in Java #2

Open avarai192 opened 3 years ago

AshrafArsanious commented 3 years ago

package com.company; import java.util.Scanner; public class Main { public static void main(String[] args) { String input; Scanner scanner = new Scanner(System.in); System.out.println("Enter the string here:\n "); input = scanner.nextLine(); System.out.println(input); } }