• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help figuring out why this method works.

 
matthew meltzer
Greenhorn
Posts: 24
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The section I'm trying to understand is in Class B...here is the original code...



After getting rid of the double slashes and messing around with the code I put that section of class B into a method and everything works fine now...Here is the full code and what I have now below.



I'm just trying to figure out why it works...I know the answer is probably really simple...if you guys could help point me in the right direction i'd appreciate it!
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

It can be fixed by -

Varying behavior for possible loss of precision explains it very well.

Regards,
Dan
 
matthew meltzer
Greenhorn
Posts: 24
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dan. I knew it was something simple, and something which I had recently gone over in the scjp study guide but it just got lost in all the other information which has been crammed into my head lately.

That link helped explain things very well too! Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic