/home/chloe/ASDV-Java/lab6_ChloeFontenot/src/main/java/com/chloefontenot/lab6_chloefontenot/If1.java
/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.chloefontenot.lab6_chloefontenot;

import java.util.Scanner;

/**
 *
 * @author chloe
 */
public class If1 {
    public static void main(String[] args)
    {
        System.out.println("Please type a positive number: ");
        
        /*
        Observe that the varible scan is eliminated
        Explanation: We create a new object by using "new Scanner" and
        then the DOT (.) nextInt() uses that new object (new varibale) to read
        */
        int number = new Scanner(System.in).nextInt();
        
        if ( number >= 0 )
            System.out.println("You typed a positive number! It was number " + number + "!");
    }
}