37. Exception Handling - Java | Exception Handling | Hackerrank

Veröffentlicht am: 23 Dezember 2018
auf dem Kanal: Learn to code
6,951
50

Exception Handling - Java | Exception Handling | Hackerrank



you are required to compute the power of a number by implementing a calculator. Create a class MyCalculator which consists of a single method long power(int, int). This method takes two integers, and , as parameters and finds . If either or is negative, then the method must throw an exception which says "". Also, if both and are zero, then the method must throw an exception which says ""

For example, -4 and -5 would result in .

Complete the function power in class MyCalculator and return the appropriate result after the power operation or an appropriate exception as detailed above.


Auf dieser Seite können Sie das Online-Video 37. Exception Handling - Java | Exception Handling | Hackerrank mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Learn to code 23 Dezember 2018 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 6,951 Mal angesehen und es wurde von 50 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!