Java Arithmetic Operator Question 7

Question

What is the output of the following code?

public class Main {
  public static void main(String[] args) {
    int i = 10;/*from w ww  .j  a  v a  2s .  c  o  m*/
    int a = 10 * i++;

    System.out.println("i is " + i);
    System.out.println("a is " + a);

  }
}


i is 11
a is 100



PreviousNext

Related