Saturday, 15 March 2014

Unable to Create Math object in Java? -



Unable to Create Math object in Java? -

i trying create object of math in java. ideally there no need of creating such instance has static methods , parameters. want create whether allow me or not. when creating math class object, compiler error displayed saying math class constructor not visible.

but looked math class code , there no explict constructor provided, java provide default constructor, can accessed outside.

this right behavior. constructor math private contains static utility methods:

private math() {}

java

No comments:

Post a Comment