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 cell has no nucleus ?​
Llana [10]
The answer is Prokaryotic Cell
5 0
3 years ago
Read 2 more answers
A table is a useful way to present information that is organized into categories, or fields.
iris [78.8K]

Answer:

true

Explanation:

hope this helps!!!

6 0
3 years ago
If the wrong server edition is installed, what command can be used to change to a different edition?​
nekit [7.7K]
Dism because it is used to change and service programs
6 0
3 years ago
OSI layer for HDLC??​
tresset_1 [31]

Answer:

HDLC is one of the most commonly used internet protocols (IP) in what is Layer 2 of the industry communication reference model called Open Systems Interconnection (OSI).

Explanation:

3 0
2 years ago
PLEASE HELPPPPPPP What should you always disconnect before installing hardware inside a computer’s case?
Ad libitum [116K]

Answer:

a) all cabling hope it helps

3 0
2 years ago
Other questions:
  • A powerful computer that acts as a hub for other computers is a called a ______.
    6·2 answers
  • Which is a copyright
    13·2 answers
  • Explain why, with fast moving mobiles, speed is more dominant in characterizing the use mobility pattern than direction?
    8·1 answer
  • Ten examples of an interpreter
    8·1 answer
  • he degree of operating leverage is equal to: Group of answer choices FC / OCF. VC / OCF. 1 FC / OCF. 1 VC / OCF. 1 Picture FC /
    9·1 answer
  • How can your network be infected with malware or ransomware?
    6·1 answer
  • The _____ method randomly rearranges the items in the list provided in the parentheses.
    5·2 answers
  • Using range(1,101), make two list, one containing all even numbers and other containing all odd numbers. How can I do this on Py
    15·1 answer
  • If you're a beginner to data analysis, what is the first thing you should check when you build data queries?
    11·1 answer
  • Priortization is an example of a skill that helps you reach long term goals because
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!