I'm new in Java, and i can't figure out why this code doesn't work (no error but nothing displays on the console).
Thanks
import java.util.Scanner;
public class HelloWorld {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str2 = sc.nextLine();
System.out.println("Please write something : ");
System.out.println("You wrote : "+str2);
}
}