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
Damm [24]
3 years ago
10

What is the difference between the throw statement and the throws clause?

Computers and Technology
1 answer:
ruslelena [56]3 years ago
6 0

Answer:

throw and throws represent different constructs in Java programming language.

Explanation:

throw is used to explicitly throw an Exception from within a code segment.

For example:

public void throw_test(String str){

        if(str==null) throw new NullPointerException();

}

throws is used to specify an exception list which may be thrown by a method:

For example:

public String readFromFile(File f) throws IOException {

.....

// Some code fragment which could throw a IOException

}

You might be interested in
Which of these purchases is most likely to be paid for with a credit card
Vesna [10]

Answer:

plane ticket?

Explanation:

7 0
3 years ago
A low-level language has a low level of ___________ because it includes commands specific to a particular cpu or microprocessor
Studentka2010 [4]
Command Specifics to a cpu or a microprocessor it is code <span />
7 0
4 years ago
The product of two integers is -180 if one of them is 12 find the other​
astraxan [27]

The answer is -15. This because 12 * 15 = 180 so in order to make it negative one of the integers has to be negative and since 12 is given you have to make 15 negative.

6 0
3 years ago
If i'm watching a show on netflix without any extra speakers besides the normal one on my tv, what setting should i use? English
sweet-ann [11.9K]
5.1 is higher quality
8 0
3 years ago
Read 2 more answers
Listening to the audience refers to what in the context of slide presentations
Anit [1.1K]

Answer: D

Explanation: This concept refers to listening for various cues, such as confusion, interest, or boredom.

8 0
3 years ago
Read 2 more answers
Other questions:
  • You discover many errors in a database table. What has been lost?
    15·2 answers
  • Determine the number of bytes necessary to store an uncompressed binary image of size 4000 × 3000 pixels.
    9·1 answer
  • WILL GIVE MEDAL NEED HELP ASAP
    7·1 answer
  • Which of the following are types of home internet service? Check all that apply
    7·1 answer
  • kieran wants to search a database quickly for information on the last time a patient came to his medical facility.The informatio
    14·2 answers
  • What is an appropriate action when an email thread becomes long?
    6·1 answer
  • Design by contract considers the software system to be a setof:
    10·1 answer
  • __________ systems support the search for and sharing of organizational expertise, decision making, and collaboration at the org
    9·1 answer
  • Write a program that takes a first name as the input, and outputs a welcome message to that name.
    9·1 answer
  • You can put ______ on your phone.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!