95.4k views
3 votes
Write the definition of a function named panic. The function prints the message "unrecoverable error" and then terminates execution of the program, indicating failure

1 Answer

4 votes

Answer:

void panic()

{

System.out.println("unrecoverable error");

System.out.println("failure");

break;

}

Explanation:

In the above function , i have created a function named panic which is written in java programming language.

It will print the message unrecoverable error and then it will print failure and later on, I have used a break statement that will end the program execution.

User Lorg
by
6.7k points