Yes, what Samir said is correct. You can test if your IDE supports the console by doing this:
if (System.console() == null)
{
System.out.println("No console supported! :-(");
} else
{
System.out.println("Console supported! :-)");
}
You can read the java-doc about System.console();
here
There can you see null
will be returned if there isn't a console.
To answer your second question
To print something:
System.out.println("Here your text you want to print");
To read something:
Scanner scanner = new Scanner(System.in);
String oneWord = scanner.next();
String oneLine = scanner.next("\n");
or:
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
Hope this helps, and you can continue learning regexes!