answersLogoWhite

0

import java.lang.Exception, the Exception class.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is immediate super class of runtime exception?

If you mean Java's RuntimeException class, its parent class is java.lang.Exception


What do you meant by Runtime Polymorphism?

Runtime polymorphism is also called as method overriding, late binding or dynamic polymorphism. It is when a method in a subclass overrides a method in its super class with the same name and signature.


Describe the JAVA throwable class hierarchy and types of exceptions?

In Java there are two main types of Exceptions. * Checked Exceptions - The ones that can be checked & handled in our code. Ex: I/O Exception, SQL Exception etc. In most cases, the compiler itself forces us to catch & handle these exceptions * Un-checked Exceptions - The ones that we cannot & should not handle in our code. Ex. Null Pointer Exception The java.lang.Throwable is the super class of all errors and exceptions in Java. Only objects of this class can be thrown & caught and handled by try-catch blocks. Ex: try { ..... ..... } catch (Exception e){ ... } finally { ... }


How do you invoke an overwritten super class from the sub class?

super


Is inheritence in java only based on super class and sub class?

Yes. Inheritance is achieved by using the super class and sub class concept


How is a constructor in the super class called?

By using the reference super(); When you invoke super(); the JVM knows that you are trying to invoke the constructor from the parent class and calls the super class constructor automatically. In fact, the invocation to super(); is usually the first line of any class constructor. This is done to ensure that all the parent class objects are initialized before the current child class is created.


What is object class in java?

object class is a super class for all other class...


How can you access the super class variables with out any object creation?

Variables of the super class can be accessed using the super keyword. Here is an example. class A { int a; } class B extends A { int a; public B() { super.a = 5; } }


What are the applications of super and this keyword?

The super and this keywords are mainly used in case of inheritance. this - refers to the object of the current class instance super - refers to the object of the instance of the parent class of the current class.


Which Abstract class is the super class for reading bytes?

java.io.InputStream


How do you invoke an overwritten super class method from the sub class?

super.methodHere();


What portions of a super class can be used by subclass?

Any members of a superclass which are declared as public or protected can be used by all subclasses.