Sunday, January 4, 2015

The difference between the println method and sqrt method

Both the  println and sqrt methods belongs to java.lang package. Where println method is available as aprt of  java.lang.System class where as sqrt method is part of java.lang.Math class.
Println method is used for printing the output onto the console. Where as sqrt method is used for processing the inputs and finding the square root of a given
value.
Println method depends on Out parameter of System class where as sqrt method is a static method of  Math class.


0 comments:

Post a Comment