title: Does java have "get line"?
body: <p>I am new to CS and I am doing this online java class which is a joke tbh. I say that because the books we got are $15 books, custom made that were used for a summer camp that was "taught" to kids. There is no where in the book that has actual java information, it is just a bunch of programs. I did a bit of searching around and I can't seem to find what I am looking for. </p>
  
  <p>One thing we have to do is modify the program so it can display first and last name. I have looked and seen that you can do two strings to get first and last name. Is there something that will get the entire line in java? </p>
  
  <pre><code>package computegrades;
  import java.util.Scanner;
  public class ComputeGrades {
  public static void main (String[] args) {
      String[] names = getNames();
      int[] scores = getScores(names);
      double average = computeAverage(scores);
      int highestIndex = getHighest(scores);
      int lowestIndex = getLowest(scores);
      System.out.format("Average = %3.2f\n", average);
      System.out.println("Highest = " + names[highestIndex] + ": " + scores [highestIndex]);
      System.out.println("Lowest = " + names[lowestIndex] + ": " + scores [lowestIndex]);
      printLetterGrades(names, scores);
  }
  
  public static void printLetterGrades(String[] names, int[] scores)  {
      for (int i = 0; i &lt; names.length; i++)  {
          if (scores[i] &gt;= 90)    {
              System.out.println(names[i] + ": A");
          } else if (scores[i] &gt;= 80) {
              System.out.println(names[i] + ": B");
          } else if (scores[i] &gt;= 70) {
              System.out.println(names[i] + ": C");
          } else if (scores[i] &gt;= 60) {
              System.out.println(names[i] + ": D");
          } else {
              System.out.println(names[i] + ": F");
          }
      }
  }
      public static String[] getNames() {
      Scanner input = new Scanner(System.in);
      System.out.println("How many students?");
      int n = input.nextInt();
      System.out.println("Please enter their first names:");
      String[] names = new String[n];
      for (int i = 0; i &lt; names.length; i++)  {
          System.out.print("name " + (i + 1) + ": ");
          names[i] = input.next();
      }
      System.out.println("Thank you.");
      return names;
  }
  public static int[] getScores(String[] names)   {
      System.out.println("Now, please enter their scores:");
      Scanner input = new Scanner(System.in);
      int[] scores = new int[names.length];
      for (int i = 0; i &lt; names.length; i++)  {
          System.out.print(names[i] + "'s ");
          System.out.print("score: ");
          while(!input.hasNextInt()){
              input.next();
              System.out.println("Please enter an integer for the score");
              System.out.print("scores: ");
          }
          scores[i] = input.nextInt();
      }
      return scores;
  }
  public static double computeAverage(int[] scores)  {
      double sum = 0;
      for (int i = 0; i &lt; scores.length; i++) {
          sum += scores[i];
      }
      return sum / scores.length;
  }
  public static int getHighest(int[] scores)  {
      int highestIndex = Integer.MIN_VALUE;
      int highestScore = Integer.MIN_VALUE;
      for (int i = 0; i &lt; scores.length; i++) {
          if (scores[i] &gt; highestScore)   {
              highestScore = scores[i];
              highestIndex = i;
          }
      }
      return highestIndex;
  }
  public static int getLowest(int[] scores)   {
      int lowestIndex = Integer.MAX_VALUE;
      int lowestScore = Integer.MAX_VALUE;
      for (int i = 0; i &lt; scores.length; i++) {
          if (scores[i] &lt; lowestScore)    {
              lowestScore = scores[i];
              lowestIndex = i;
          }
      }
      return lowestIndex;
  }
  }
  </code></pre>