Giving error as: The main method should display the result of a sqr method. Though the program is giving output.