Expressions.java - public class Expressions cfw public static void main(String args cfw int a = 3 int b = 4 int c = 5 int d = 17 System.out.println(a b
Expressions.java - public class Expressions cfw public...
public class Expressions{public static void main(String[] args){int a = 3;int b = 4;int c = 5;int d = 17;System.out.println((a + b)/ c);// 3 and 4 are added with sum 7// 7 is divided by 5 with quotient 1System.out.println(a + b / c);// 4 is divided by 5 with quotient 0// 3 is added to 0 with sum 3System.out.println(a++);// 1 is added to 3 with sum 4// However, I don't understand how when I run this the answer is 3System.out.println(a--);// 1 is subtracted from 3 with answer of 2//Again, I don't understand how this is equal to 4System.out.println(a + 1);// 3 and 1 are added with sum 4System.out.println(d % c);// 17 is divided by 5 which equals 3 with a remainder of 2System.out.println(d / c);// 17 is divided by five with quotient 3System.out.println(d % b);// 17 is divided by 4 which equals 4 with a remainder of 1