What are checked and unchecked exception, JAVA Programming

Assignment Help:

What are Checked and UnChecked Exception?

A checked exception is some subclass of Exception (or Exception itself), excluding class RuntimeException and its subclasses. Making an exception checked forces client programmers to deal with the possibility that the exception will be thrown.

Example: IOException thrown by java.io.FileInputStream's read() method·

Unchecked exceptions are RuntimeException and any of its subclasses. Class Error and its subclasses also are unchecked. With an unchecked exception, though, the compiler doesn't force client programmers either to catch the exception or declare it in a throws clause. In fact, client programmers might not even know that the exception could be thrown.

Example: StringIndexOutOfBoundsException thrown by String's charAt() method· Checked exceptions must be caught at compile time. Runtime exceptions do not require to be. Errors often cannot be.

 


Related Discussions:- What are checked and unchecked exception

Pseudocodes, Draw a 5 inch square on the screen using pseudocode

Draw a 5 inch square on the screen using pseudocode

How to creating arrays in java, How to Creating Arrays in java? Declari...

How to Creating Arrays in java? Declaring arrays merely says what type of values the array will hold. It does not form them. Java arrays are objects, and such as any other obje

Code for calculatr, how i made a calculator in java plz tell help me

how i made a calculator in java plz tell help me

Neatbeens and glass fish, Assignment 3 Project Proposal Documentation Descr...

Assignment 3 Project Proposal Documentation Description Marks out of Wtg(%) Due date Assignment 3 100 35% 15/09/14 In the assignment we will start analysing and designing the

Conditional Execute, Write a program that prompts for two people’s birthday...

Write a program that prompts for two people’s birthdays (month and day), along with today’s month and day. The program should figure out how many days remain until each user’s birt

Define array, Define Array ? Indexed collections of variable of similar...

Define Array ? Indexed collections of variable of similar data types or we can say a Set of organized variables of similar type.

Develop an employee application, Employee application Project Descriptio...

Employee application Project Description: Subsequent Technology should be used 1) UI (jsp, jstl ,html, etc) 2) Framework (Spring MVC and hibernate) 3) Database (MYSQ

What is a packet in the network environment, What is a packet within the ne...

What is a packet within the network environment? What kind of information does it contain? A packet is the shortest unit of data transmitted over a computer network. It's a mes

Calculate Bill program, Notice that each row now has the type of customer a...

Notice that each row now has the type of customer and the additional data needed. calculateBill remains the same in Customer.  However, the calculateBill in Corporate will add a

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd