answersLogoWhite

0


Best Answer

no, because catch is used to handle exceptions which are generated from try block

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

the catch block catches the exception from the try block to display a proper message about the exception.

Answered by, SOORAJ.M.S

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

The catch keyword is used in Java exception handling along with try blocks. It is used to catch and handle exceptions that are thrown inside the try block

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why use catch keyword in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the use of try in java?

The try keyword is used in Java to handle problematic situations that are commonly known as "Exceptions" The try keyword is used in conjunction with the catch keyword. If any exception is thrown by code inside the try block, they will be caught and handled by the catch block. Ex: try { ... ... } catch (Exception e){ ... }


Is check a keyword in java?

No, 'check' is not a keyword in java language.


How you do use finally keyword in java?

You use it in combination with "try" and "catch". Any commands after "finally" will be run whether there is an error or not. Cleanup commands are typically placed here.


Is float is a keyword in java?

yes, float is keyword and data type in java


How java use extern key word which is used in C plus plus?

No extern keyword in Java.


Can NullPointerException be used with ArithmaticException using throws keyword in java?

No. You cannot throw or catch Null pointer exceptions


What does the verify keyword do in Java?

"verify" is not a Java keyword. I believe the link, in related links, has the complete list of Java keywords.


Can you declears static in a local variable in a method in java?

we cannot use the staic keyword inside the method... But we can use the final keyword inside the method....


What is foreign keyword in java?

There is no "foreign" keyword in Java, however, there is a native keyword that declares native methods in a native language, such as C or C++.For full list of keywords in Java see related question.


What is literal in java programming?

Literal in java are L, F, null, true, false These act as keyword(have special meaning in java) but these does'nt comes under the category of Java Keyword.


What is java's keyword for the integer data type?

"int" is the keyword for integer


Can a single Java class subclass extend both InputStream and Reader. True or False?

Java does not have multiple inheritance, so no. Java can use multiple interfaces, though, with the "implements" keyword.