illumin interview question

How to flood fill a matrix with given value using Java.