Coding examples
Capturing

import java.io.*;
public class read_a_string {
    public static void main (String[] args) {
        System.out.print("Please enter your name: ");
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String strName = null;
        try {
                strName = br.readLine();
            }
                catch (IOException ioe) {
                System.out.println("I had a problem reading your name");
                System.exit(1);
            }
        System.out.println("Hello there " + strName);
    }
}
 
Not using this feature to its fullest, will possibly do so some time in the future though.