News for hackers. Stuff that matters.
Re:Java Puzzle: Square Root by wheaties on Tuesday March 19, 2013 @10:41PM (#5405275)
I hate to break it to you but "n" is not final. Hence, you can reassign any BigInteger to it. Why not just set n = 9 and the root = 3...

Immutability is your friend. Use it or lose it.

Re:Java Puzzle: Square Root by craigching on Tuesday March 19, 2013 @10:45PM (#5405286)
But n is also private, so you can't reassign it without using setAccessible or changing the security manager, both forbidden by the rules.
Re:Java Puzzle: Square Root by coolbrow on Tuesday March 19, 2013 @10:46PM (#5405289)
But "n" is private and the rules state the solution must be in a different class. Thus you can't simply reassign it.
Re:Java Puzzle: Square Root by tantalor on Tuesday March 19, 2013 @10:45PM (#5405287)
You can't assign anything to a private variable.