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
What is used in computers to communicate with wireless keyboards, mice, and printers?
vekshin1
Usb adapter -----------
5 0
3 years ago
Windows OS and Mac OS are examples of which type of operating system?
german
Windows OS and Mac OS are examples of single user, multi tasking Operating Systems.
5 0
3 years ago
Read 2 more answers
How could an online college utilize enterprise software? A. Develop new technical support jobs B. Improve course resources and n
Nata [24]

Answer:

The answer is "Choice B"

Explanation:

The enterprise applications is a software program that is used to meet the demands of planning instead of individual users. It also is referred to as business software applications that include schools, stakeholders involved, clubs, charity organizations as well as the states. Its develops processes for the course or viewing software used by online courses.

5 0
3 years ago
Need A girl to play wit I'm bored On xbox btw or just to talk too btw be at least 12​
attashe74 [19]

Answer:

im 13 and im a girl wassup

Explanation:

3 0
3 years ago
Read 2 more answers
Scott does not use privacy settings on his social media
likoan [24]

Answer:

ARREST HIM!!!

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • Some financial institutions can be really bad about putting unexpected charges
    12·1 answer
  • In which situation will file compression be required to complete the task
    15·1 answer
  • A ________ is a collection of forms, reports, queries, and programs that serves as an intermediary between users and database da
    6·1 answer
  • This is question 2.5 Computer Science and I don't understand what is wrong<br><br>​
    15·1 answer
  • Which segment of society introduced the grunge look?
    5·2 answers
  • List and describe the tools for all the main stages of app/application development.
    11·1 answer
  • In terms of object-oriented programming, after a class is defined,
    11·1 answer
  • Ryan is working on a document with many secotions. For each section,he wantes to have the title bolded,underlined,an blue. Which
    9·2 answers
  • Netflix shows to watch?
    11·2 answers
  • Find the smallest value of n such that LCM of n is 15 is 45​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!