int a=1,b=10;
System.out.println(a+b--);

Answer Posted / mamitha

Ans.11 b'coz based on operator precedence rule, -- ll works first and we get 10 for b (post decrement) and it ll add with 1 .

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the exact difference in between Unicast and Multicast object? Where will it be used?

580


What is the use of singleton class?

519


hr interview how many minutes asking question

1564


Can we have a method name same as class name in java?

579


Why is inheritance used in java?

602






What is difference between local variable and global variable?

472


Why do we need wrapper class?

535


How to print nodes of a Binary tree?

1752


Can we override the static methods?

568


How can constructor chaining be done by using the super keyword?

614


What does || mean in vectors?

475


Give us the name of the list layoutmanagers in java?

522


Explain java coding standards for classes or java coding conventions for classes?

612


What do you mean by static variable?

569


Java Compiler is stored in JDK, JRE or JVM?

1050