Examveda

In which of the following package Exception class exist?

A. java.util

B. java.file

C. java.io

D. java.lang

E. java.net

Answer: Option D

Solution (By Examveda Team)

The Exception class is part of the java.lang package.

java.lang is one of the core packages in Java, automatically imported into every Java program.

The Exception class, being part of this package, is the base class for all exceptions in Java. It handles various types of runtime errors, allowing developers to manage error conditions gracefully.

This Question Belongs to Java Program >> Exceptions

Join The Discussion

Related Questions on Exceptions