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
Do the following SQL questions. The resulting columns must all have descriptive names. You must show the result of the query. Fo
Maslowich

Answer:

We can use CREATE command to create tables with columns having descriptive names

Explanation:

Firstly, create a table using CREATE  command in SQL. The syntax is as follows:

CREATE TABLE [table_name]

(

 [col_name] [datatype]),

[col_name] [datatype]),

[col_name] [datatype]),

[col_name] [datatype])

)

Once the table is created, we can insert the data into table using INSERT command. It's syntax is as follows:

INSERT INTO table_name VALUES('', '', '')

if datatype is string, values must be entered within single quotes. If datatype is int, values are entered directly without using  quotes.

Now, you can select the data from  the table using SELECT command. It's syntax is as follows:

SELECT column-list FROM table_name

If you want to filter rows according to conditions, you can use WHERE command.

I have created  sample table and inserted some data into it. Now, I applied some queries on it to select data from the table.

I have written in a text file and attached the same. Please find. Thank you!

Download txt
3 0
4 years ago
Why would you want to look at the HTML code on a website when using a Web
dusya [7]

I would want to look at the HTML code on a website when using a Web page editor to change attributes that the editor cannot change. Text editors like Notepad and TextEdit can not only help you learn HTML, but also get things done for you. However, most web developers prefer using a web page editor over text editors because they can help boost productivity.

Explanation:

For instance, say you want to write an opening HTML tag, a web page editor will automatically include the closing tags, thus reducing the typing required. This can pose as an advantage and a disadvantage. By default, HTML supports various tags and includes the autocomplete feature for attributes. Most developers, not matter how smart or experienced they might be, will constantly run into errors. In as much as a HTML editor autocompletes elements found in attributes for you, developers would want to look at the HTML code on a website. It will help them find and correct syntax and runtime errors

Forgetting to put quotation marks on an attribute values, alone, will cause errors. An editor will not change these errors and a developer will be required to review the code and make changes.

Learn more about page editors

brainly.com/question/10002469

brainly.com/question/4004088

#LearnWithBrainly

8 0
4 years ago
What might happen if Python code is not in the correct order? The computer will fix the steps automatically. The computer will f
Vesna [10]

Answer:

The computer will follow the steps, but the program might not work.

Explanation:

4 0
3 years ago
Read 2 more answers
Short Answer:
nirvana33 [79]
Your level if intoxiation is determined by your BAC

6 0
3 years ago
PLZ HELP ME I WILL GIVE BRAINLIST!!! Why was the Internet originally constructed?
pochemuha

Answer:

C. to provide online search capabilities

Explanation:

The first workable prototype of the Internet came in the late 1960s with the creation of ARPANET, or the Advanced Research Projects Agency Network. Originally funded by the U.S. Department of Defense, ARPANET used packet switching to allow multiple computers to communicate on a single network.

5 0
3 years ago
Other questions:
  • Using a subject directory, you locate a particular topic by clicking links through different levels. a. True b. False
    10·1 answer
  • If you have a long title for a table and need it to span several cells, you can use A. Merge Cells. B. Split Cells. C. Insert Co
    5·1 answer
  • An isotope of an element has:
    11·2 answers
  • Help please brainliest
    8·1 answer
  • Why OSI is called open system?
    8·1 answer
  • Once a virus has been removed by your anti-virus program, all traces of it are gone from your computer.
    9·1 answer
  • ______ allows a thread to run on only one processor.
    6·1 answer
  • 50 PTS
    5·1 answer
  • An object completes one round of circle of radius 7m in 20 sec. Distance travelled after 10 sec is? ​
    12·1 answer
  • Explain about third generation of computer​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!