• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help with the Ouput (Enthuware)

 
Shweta Verma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Guys,

I need help with the following code (from Question enthuware.ocajp.i.v8.2.1409):



Ouput : 6 10
I am not sure how this output comes??
Please explain the logic behind this question.

Appreciate for your answer.

Regards,
Shweta Verma
 
Roel De Nijs
Sheriff
Posts: 10666
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shweta Verma,

First of all, a warm welcome to CodeRanch!

Shweta Verma wrote:I am not sure how this output comes??
Please explain the logic behind this question.

Remember that, in Java, everything is pass by value. This is a very important concept in Java. So a good solid understanding is required to pass the exam. So you'll probably want to read this excellent article as well. And in this topic you'll find an excellent explanation (with code examples) about this concept too. So definitely worth reading! And if you would still have doubts or questions, don't be shy and just hit the reply button

Hope it helps!
Kind regards,
Roel

PS. Always use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information. Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers. Jeanne already added the code tags for you. See how much easier the code is to read?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic