This is my solution to the first exercise of Princeton's course on Coursera.
https://www.coursera.org/course/algs4partI
Here's the specification:
http://coursera.cs.princeton.edu/algs4/assignments/percolation.html
It was graded with a 96.75% score.