37. Exception Handling - Java | Exception Handling | Hackerrank

Опубликовано: 23 Декабрь 2018
на канале: 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.


На этой странице сайта вы можете посмотреть видео онлайн 37. Exception Handling - Java | Exception Handling | Hackerrank длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Learn to code 23 Декабрь 2018, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 6,951 раз и оно понравилось 50 зрителям. Приятного просмотра!