aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes help figuring out why this method works. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "help figuring out why this method works." Watch "help figuring out why this method works." New topic
Author

help figuring out why this method works.

matthew meltzer
Greenhorn

Joined: Sep 08, 2012
Posts: 24

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

Joined: Jul 09, 2001
Posts: 1180

It can be fixed by -

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

Regards,
Dan

William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
matthew meltzer
Greenhorn

Joined: Sep 08, 2012
Posts: 24

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.
 
 
subject: help figuring out why this method works.