পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Wednesday, January 18, 2017

Java.lang.Throwable Class

Introduction

The java.lang.Throwable class is the superclass of all errors and exceptions in the Java language. Only objects that are instances of this class (or one of its subclasses) are thrown by the Java Virtual Machine or can be thrown by the Java throw statement.

Class declaration

Following is the declaration for java.lang.Throwable class:
public class Throwable
   extends Object
      implements Serializable

Class constructors

S.N.Constructor & Description
1 Throwable() This constructs a new throwable with null as its detail message.
2 Throwable(String message) This constructs a new throwable with the specified detail message.
3 Throwable(String message, Throwable cause) This constructs a new throwable with the specified detail message and cause.
4 Throwable(Throwable cause) This constructs a new throwable with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).

Class methods

S.N.Method & Description
1 Throwable fillInStackTrace()
This method fills in the execution stack trace.
2 Throwable getCause()
This method returns the cause of this throwable or null if the cause is nonexistent or unknown.
3 String getLocalizedMessage()
This method creates a localized description of this throwable.
4 String getMessage()
This method returns the detail message string of this throwable.
5 StackTraceElement[] getStackTrace()
This method provides programmatic access to the stack trace information printed by printStackTrace().
6 Throwable initCause(Throwable cause)
This method initializes the cause of this throwable to the specified value.
7 void printStackTrace()
This method prints this throwable and its backtrace to the standard error stream.
8 void printStackTrace(PrintStream s)
This method prints this throwable and its backtrace to the specified print stream.
9 void printStackTrace(PrintWriter s)
This method prints this throwable and its backtrace to the specified print writer.
10 void setStackTrace(StackTraceElement[] stackTrace)
This method sets the stack trace elements that will be returned by getStackTrace() and printed by printStackTrace() and related methods.
11 String toString()
This method returns a short description of this throwable.

Methods inherited

This class inherits methods from the following classes:
  • java.lang.Object

No comments:

Post a Comment