/** * Prints out some basic arithmetic facts * Illustrates the different uses of the + operator * * @author alchambers */ public class Arithmetic{ public static void main(String[] args){ System.out.println("I can do basic arithmetic!"); System.out.println(); System.out.println("5 + 4 = " + 9); System.out.println("5 + 4 = " + 5 + 4); System.out.println("5 + 4 = " + (5 + 4)); System.out.println(); System.out.print("If 1 orange costs .25 cents then "); System.out.println(2 + " oranges cost " + 2*.25 + " cents"); } }