The document contains a Java class named Calculator with two static methods for calculating powers: one for integers and another for doubles. The main method tests both methods, demonstrating their functionality by calculating 2 raised to the power of 3 and 2.5 raised to the power of 3. The results are printed to the console.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
7 views1 page
PGM 2
The document contains a Java class named Calculator with two static methods for calculating powers: one for integers and another for doubles. The main method tests both methods, demonstrating their functionality by calculating 2 raised to the power of 3 and 2.5 raised to the power of 3. The results are printed to the console.