previous | start | next

Self Check

  1. Why can't input be read directly from System.in?
  2. Suppose in is a Scanner object that reads from System.in, and your program calls
    String name = in.next();
    What is the value of name if the user enters John Q. Public?

previous | start | next