answersLogoWhite

0

What is the use of try in java?

User Avatar

Anonymous

16y ago
Updated: 8/17/2019

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){

...

}

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

When l try to use craftbukkit for minecraft it says that java is not recognized as an internal or external command?

If you don't have Java installed, download and install it. If you do have Java installed, try changing 'java' in the batch file to "C:\Program Files\Java\jre6\bin\java.exe" (with quotes) or wherever you have Java installed.


Why does the RuneScape website work but the game does not?

One thing you might try is to use a different browser. For example, if it doesn't work with FireFox, try Opera or Google Chrome. You may have a problem with the Java installation, so reinstalling Java for the browser may also help.One thing you might try is to use a different browser. For example, if it doesn't work with FireFox, try Opera or Google Chrome. You may have a problem with the Java installation, so reinstalling Java for the browser may also help.One thing you might try is to use a different browser. For example, if it doesn't work with FireFox, try Opera or Google Chrome. You may have a problem with the Java installation, so reinstalling Java for the browser may also help.One thing you might try is to use a different browser. For example, if it doesn't work with FireFox, try Opera or Google Chrome. You may have a problem with the Java installation, so reinstalling Java for the browser may also help.


Cannot get java to work on windows browser?

Sometimes you have to download Java from the relevant Web page. Sometimes it helps to use a different browser. For example, if you usually use FireFox, try Opera or Google Chrome instead.Sometimes you have to download Java from the relevant Web page. Sometimes it helps to use a different browser. For example, if you usually use FireFox, try Opera or Google Chrome instead.Sometimes you have to download Java from the relevant Web page. Sometimes it helps to use a different browser. For example, if you usually use FireFox, try Opera or Google Chrome instead.Sometimes you have to download Java from the relevant Web page. Sometimes it helps to use a different browser. For example, if you usually use FireFox, try Opera or Google Chrome instead.


Why use throw in java in compare try-catch?

we use throws in our program so that we dont need to write try & catch block & to avoid the exception


Can you use pointers in java?

Java does not support Pointers and hence you cannot use it in Java.


Do you need to learn Java script to be able to use it?

No. Java Script is huge and learning all of it is impossible. Just try and code the basics and later get to the harder stuff


I've updated java 3 times and when I try to use java I get an error saying my java is out of date I've tried hitting the run this time button it doesn't work?

Just press the button that says run time, or something like that, unfortunateley you have to press that button every time you use a java thingamajig


Java runescape isn't working when try to verify it goes back to it seems like java isn't installed on your computer what do i do?

Your java might be out of date, try updating it and try again, if that fails completely uninstal java, then re install the latest version from filehippo or something.


What is the RuneScape plug in?

probelry the java plug in try link below


What technologies link to Java?

Java is exclusive to surfing the web. Some web sites use Java to embed videos, others use Java for advertisements.


What you use in case of pointer in java?

Java does not have pointers


Does Java Script use the same compiler as Java?

No