incrementDecrement 4-1
Post date: Feb 1, 2014 4:29:24 PM
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
// This program demonstrates the ++ and -- operators
package incrementdecrement;
public class IncrementDecrement {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
int number =4; //number starts out with 4
// Display the value in number.
System.out.println("number is " + number);
System.out.println("I will increment number.");
// Increment number.
number++;
// Display the value in number again
System.out.println("Now, number is "+number);
System.out.println("I will decrement number.");
// Decrement number.
number--;
// Display the value in number once i
System.out.println("Now, number is "+number);
}
}