title: How to make "un-entered" user input show "not available" -- Java
body: <p>I am just a beginner, so any help would be appreciated.</p>
  
  <p>So here is my code:</p>
  
  <pre><code>import java.util.Scanner;
  
  public class AccountScanner {
  
  public static void main (String[] args) {
  
  String name, course;
  int age;
  
  Scanner input = new Scanner(System.in);
  
  System.out.print("Enter name: ");
  name = input.nextLine();
  
  System.out.print("Enter age: ");
  age = input.nextInt();
  
  System.out.print("Enter Course: ");
  course = input.next();
  
  System.out.println();
  System.out.println("Name:" +name);
  System.out.println("Age:" +age);
  System.out.println("Course:" +course);
  
  
  System.exit(0);
  }
  }
  </code></pre>
  
  <p>but what if the user did enter one of the details. What can I do to make it display "Not Available" instead</p>
  
  <p>example:</p>
  
  <pre><code>enter name: Zack
  enter age: 
  enter course: BSCS
  </code></pre>
  
  <p>output would be:</p>
  
  <pre><code>Name: Zack
  Age: Not available
  Course: BSCS
  </code></pre>