answersLogoWhite

0

Never.

A program should handle exceptions, but should NEVER USE exceptions to control program flow.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What are the classifications of program bugs?

Some common types of program bugs are: Arithmetic bugs Logic bugs Syntax bugs Resource bugs Multi-threading programming bugs Interfacing bugs Performance bugs Teamworking bugs


What is executable code?

short answer: executable code is a program that is ready to be used write now. long answer: writing a computer program is generally a 2 part process (there are exceptions): 1) programmer writes the code 2) programmer runs his code through a special program called a Compiler the Compiler is responsible for taking code that a programmer can understand, and turning it into something that a computer can understand. executable code is (usually) code that has been compiled.


How do people make minecraft mods?

They program them using code and Java.


Checked and unchecked exceptions?

Unchecked exceptions : * represent defects in the program (bugs) - often invalid arguments passed to a non-private method. To quote from The Java Programming Language, by Gosling, Arnold, and Holmes : "Unchecked runtime exceptions represent conditions that, generally speaking, reflect errors in your program's logic and cannot be reasonably recovered from at run time." * are subclasses of RuntimeException, and are usually implemented using IllegalArgumentException, NullPointerException, or IllegalStateException * a method is not obliged to establish a policy for the unchecked exceptions thrown by its implementation (and they almost always do not do so) Checked exceptions : * represent invalid conditions in areas outside the immediate control of the program (invalid user input, database problems, network outages, absent files) * are subclasses of Exception * a method is obliged to establish a policy for all checked exceptions thrown by its implementation (either pass the checked exception further up the stack, or handle it somehow) It is somewhat confusing, but note as well that RuntimeException (unchecked) is itself a subclass of Exception (checked).


How do you write a program in C using the fprint and fscan functions?

By using those two functions in your code.


Program to convert bcd to gray code using 8051 microcontroller.?

66666


What are general debugging methods in c plus plus?

General debugging techniques include using exceptions and using the debugger to step-into certain sections of code to check for errors.


How do you write a program on watfor77?

To write a program in Watfor77, you start by using a text editor to create a source code file with a .f extension. The program follows Fortran 77 syntax, which includes defining variables, writing subroutines, and using control structures like loops and conditionals. Once your code is written, you compile it using the Watfor77 compiler, which translates the Fortran code into an executable format. Finally, you run the compiled program to see the output.


What is the use of function in c?

using function we can call the function in the program any where. by using functions we can reduce the code redundancy


How do you program CD code Honda CR-V 1998?

You cannot program the code. The code was programmed at the factory. You insert the 5 digit code using the radio preset buttons. If you do not know the code then register your Honda at the Honda Owners website. After registering your vehicle you can get the code for free. click the link.


Discuss how exceptions can be handled using a Java program?

Exceptions are generated by the Java Virtual Machine during program execution. When the JVM comes across a piece of code that it cannot execute properly or a piece of code that will create issues when the JVM executes it will generate an exception. Ex: divide by 0 or trying to access a null variable etc The language also has syntax that can catch and handle these situations. It is called the try - catch - finally construct. Ex: try {


How do modules help you reuse code in a program?

MODULES ALSO REDUCE THE DUPLICATION OF CODE WITHIN A PROGRAM..THIS BENEFIT OF USING MODULES IS KNOWN AS code reuse BECAUSE YOU ARE WRITING THE CODE TO PERFORM A TASK ONCE AND THEN REUSING IT EACH TIME YOU NEED TO PERFORM A TASK.