The code snippet below reads a String form the console using StreamTokenizer.

Java Code:
      StreamTokenizer Input=new StreamTokenizer(System.in); 
      try {
         System.out.print("Country : ");
         Input.nextToken();
         System.out.println(Input.sval);
      }
      catch (Exception e) {
         e.printStackTrace();
      }