Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Working with strings, arrays (OCA 7study guide K&B) pg 302

 
Priyavrat Kumar
Greenhorn
Posts: 27
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why result is 4 4?
It seems that two different objects are created but answer in the book states that only 1 object was created.
Please explain.



 
Henry Wong
author
Marshal
Pie
Posts: 22113
88
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Priyavrat Kumar wrote:Why result is 4 4?
It seems that two different objects are created but answer in the book states that only 1 object was created.
Please explain.

You'll find an explanation of the exact same question in this topic. Does it clear your doubts? Or do you need some additional explanation to fully understand this question/output?

Hope it helps!
Kind regards,
Roel
 
Priyavrat Kumar
Greenhorn
Posts: 27
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic