My Programming

The comprehensive way to start programming

Difference between throw and throws keywords

Whenever we want to force an exception then we use throw keyword. the throw keyword (note the singular form) is used to force an exception. It can also pass a custom message to your exception handling module. Moreover throw keyword can also be used to pass a custom message to the exception handling module i.e. the message  [ Read More ]

Continue

How to throw Exceptions in Java

The exception is an exception object containing the details of the error being raised. This can be declared as an object and initialised before the throw command or included in the throw statement, using the new keyword and one of the exception’s constructors to set the object’s properties. Before you can catch an exception, some code somewhere  [ Read More ]

Continue

How to Use Finally Clause

The finally block always executes when the try block exits. This ensures that the finally block is executed even if an unexpected exception occurs. But finally is useful for more than just exception handling — it allows the programmer to avoid having cleanup code accidentally bypassed by a return, continue, or break. Putting cleanup code in a finally block is always a good practice, even  [ Read More ]

Continue

How to Catch Exceptions

To see how an exception is caught, you must first understand the concept of a guarded region. This section of code might produce exceptions and is followed by the code to handle those exceptions. If you are inside a method and you throw an exception (or another method that you call  [ Read More ]

Continue

Java Null pointer exceptions

NullPointerException  is the exception that occurred when a programmer perform an operation on a object  or calling a method on the object i.e null. This exception is thrown by JVM.We should not handle that exception by try and catch block  The only way to resolve Null Pointer Exception is to  [ Read More ]

Continue

C# Versus Other Programming Languages

C# is one of the newest programming languages. It is a good that this will become a very popular language for a number of reasons. One of the key reasons is Microsoft and the promises of .NET. You might have heard about Visual Basic, C++, and Java. Perhaps you’re wondering  [ Read More ]

Continue

Differences Between C# and C++

C# is a modern object-oriented language developed by a Microsoft team led by Anders Hejlsberg. C# is a strongly typed object-oriented language whose code visually resembles C++ (and Java). This decision by the C# language designers allows C++ developers to easily leverage their knowledge to quickly become productive in C#, C# syntax  [ Read More ]

Continue

Subscribe to email feed

  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

Difference between t

Whenever we want to force an exception then we use throw keyword. the throw keyword ...

How to throw Excepti

The exception is an exception object containing the details of the error ...

How to Use Finally C

The finally block always executes when the try block exits. This ensures that the finally block is executed ...

How to Catch Excepti

To see how an exception is caught, you must first ...

Java Null pointer ex

NullPointerException  is the exception that occurred when a programmer perform ...

Difference between t

Whenever we want to force an exception then we use throw keyword. the throw keyword ...

How to throw Excepti

The exception is an exception object containing the details of the error ...

How to Use Finally C

The finally block always executes when the try block exits. This ensures that the finally block is executed ...

How to Catch Excepti

To see how an exception is caught, you must first ...

Java Null pointer ex

NullPointerException  is the exception that occurred when a programmer perform ...

Twitter updates