/** * Prints out some basic arithmetic facts * Illustrates the different uses of the + operator * * @author alchambers * @version sp17 */ public class Arithmetic{ public static void main(String[] args){ System.out.println("The first use of the + symbol is to concatenate " + "very, very long strings together"); System.out.println(); 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"); } }