1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Masteriza [31]
3 years ago
8

What can a method do with a checked exception? Check the exception or ignore it. Return the exception to the sender or handle it

in a catch block. Throw the exception to the method that called this method, or handle the exception in a catch block. Handle the exception in the try block or handle the exception in the catch block.
Computers and Technology
2 answers:
Serggg [28]3 years ago
8 0

Answer:

Handle the exception in a catch block or throw the exception to the method that called this method.

Explanation:

The try and catch statements occur in pairs. The try statement allows the user to define a block of code to be tested for errors while it is being executed.

The catch statement allows the user to define a block of code to be executed, if an error occurs in the try block.

If an exception is checked by a method, the method either handles the exception in a catch block or throw the exception to the method calling it.

Aneli [31]3 years ago
6 0

Answer:

Throw the exception to the method that called this method, or handle the exception in a catch block.

Explanation:

First let us understand what an exception is. A program is a set of instructions and it is executed in a flow which is called flow of program which an exception can interrupt. This exception is basically an unexpected event. Exception can be checked (which is compile time exception) or unchecked (run time exception).  When the exception object is created to indicate the type of error occurred which interrupted the program flow this exception is thrown which indicates that an unexpected event or error has occurred in a program.  

So when a exception is thrown one of two ways are used to deal with it

  • Handle the exception in a catch block,
  • Throw the exception to the method that called this method. It usually has a throw clause which defines what exceptions a method can handle and what not.

Exceptions are handles using try catch block. In this block there are two keywords which are used i.e. try and the other one is catch.

try basically defines a block of code. This block of code is executed and is checked for exceptions.

Now if the exception occurs, catch statement is used to handle this exception. So the catch part is executed when an exception occurs. However if catch statement fails to process this exception then this is thrown to the caller method.

A very common example is of a checked exception FileNotFoundException.

This error occurs when a program wants to read a file. So we get a compiler time exception to handle for situations in which the file does not exist in the location.

So this checked exception is handles either by the catch block or by throwing this exception to the method that called this method.

In catch block we can determine how to handle if the file is not found. If catch block is unable to handle this exception then we will use throw clause. So whenever this exception occurs the methods can throw the IOException and FileNotFoundException is basically a subclass of this. For example in JAVA, java.io.IOException is used for handling such exceptions.

You might be interested in
A person clicks on an ad of a fitness club in a blog on nutrition. The person conducts a search on yoga and moves to another web
ra1l [238]

Answer:

Option A. Third-party cookies

Explanation:

When you are browsing a website, this can store small pieces of useful data, based on your activity during your visit. This information is being collected by the website you are looking at, and you can see its domain on your address bar. Unlike regular cookies (or First-party cookies).

A third-party cookie belongs to a different domain than the one on your address bar. This is widely used in internet ads to show a person ads that will most likely interest him/her, according to where he/she is clicking. If you click on an internet ad, you will send information to the ad's domain, a cookie will be stored, stating that you are interested in this kind of ad. The advertiser can use these cookies to improve his advertising campaign or create more effective ads.

6 0
4 years ago
To be a forensic technician, do you have to go to a police academy?
sergejj [24]
Yea  i think u do sry if im wrong

6 0
4 years ago
The color encoding we’re using is RGB.What does this mean,in terms of the amount of memory required to represent color? Is there
DanielleElmas [232]

Answer:

RGB

Explanation:

R=red

G=Green

B=Blue

RGB is standard scheme of colors ,rest of the colors use to be make by mixing three of these colors. These are standard colors use for monitor,computer and Tv screen.

RBG plays an vital role in the memory of the computer. For example the JPG file is RBG-24 bit file. So it is easy to upload the file that is JPG and it is easy to edit and upload. This file is taking less RAM so the editors usually keeps the JPG file along with them because it is easy to compress and edit the file.

Hence it is proved that RGB color coding is very efficient for the usage of the memory because it is already a compressed file and use the RAM so efficiently, so the quality of task done by CPU would never be compromised by using RGB.

Large photo is usually composed of more colors and the computer use to struggle alot for such iamge files.

The RGB code (0-255 for each of R, G, B) carrirs  16777216 possible matches. It's not almost "every new color," but it made up more than most of the colors humans can easily identifies.

we must say that RGB is not the perfect choice for making every possible color that is existing but it is quite helpful in making every unique color that a human could identify. RGB is mostly makes the light color with the combination of these three colors.

RGB is not the best for making every possible color but it is so useful as far as the computer memory is concern it uses very less memory and it file is quite light. Uploading of JPG file is easy ,it takes less time and memory.

On clouds the memory is most important element so, mostly the RGB are preferred colors and these are enough to represent in compute scheme.

8 0
3 years ago
Many malware attacks are ____ attacks, which involve more than one type of malware and/or more than one type of transmission met
Sedbober [7]

C. Malicious software (aka malware).

Hope this helps.

7 0
3 years ago
The Lisp function LENGTH counts the number of elements in the top level of a list. Write a function ALL-LENGTH of one argument t
Novosadov [1.4K]

Answer:

bc

Explanation:

5 0
3 years ago
Other questions:
  • What is the meaning for science?
    14·1 answer
  • HTML code must be enclosed in the _______ (angle brackets) so the browser can tell the difference between code and content you w
    6·2 answers
  • Assume that name is a variable of type string that has been assigned a value . write an expression whose value is the first char
    14·1 answer
  • The document theme does not determine the appearance of the style
    6·1 answer
  • What does an executable file contain? Program instructions written in source code. Program instructions that have been compiled
    15·1 answer
  • in a management information system, the quality of information is determined by its usefulness to users, and its usefulness dete
    8·1 answer
  • What are the pros and cons of the internet’s ability to access information
    8·2 answers
  • Get someone get her for me if need snap kell.c11
    10·1 answer
  • What are the different methods of enhancing/decorating<br> bamboo product​
    15·1 answer
  • I don't know what to do, anyone there?​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!