Java2Blog
  • Home
  • Core Java
  • Tutorials
    • Spring
    • Spring Boot
    • Spring MVC
    • Java 8
    • Hibernate
  • Categories
    • Interview Questions
    • Spring Frameworks
    • Core java
    • Python
    • C++
  • NM
close
import_contacts

Java Tutorials

  • Core Java
  • Java Interview questions
  • Java 8 Stream
  • Java interview programs
import_contacts

Data structure and algorithm

  • Data structure in java
  • Data structure interview questions
import_contacts

Spring tutorials

  • Spring tutorial
  • Spring boot tutorial
  • Spring MVC tutorial
  • Spring interview questions

Exception Handling

  • Exception Handling Java 9
    19 September

    Java try with resources

    In this post, we will see about Java try with resources Statement. Java try with resources is a feature of Java which was added into Java 7. It helps to close all the resources declared within try block. It automatically closes the resources after being used. A resource can be any file or a database […]

    Read More
  • Exception Handling Interview Questions
    Exception Handling Interview Questions Core Java interview Interview
    22 February

    Java Exception Handling Interview Questions And Answers

    Exceptional handling is one of the most important topics in core java. Here is list of questions that may be asked on Exceptional handling. Question 1: What is Exception ? Answer: Java doc says “ An exception is an event, which occurs during the execution of a program, that disrupts the normal flow of the program’s […]

    Read More
  • Core Java interview Exception Handling
    15 February

    Difference between throw and throws in java

    In this tutorial, we are going to see difference between throw and throws in java. throw: throw keyword is used to throw any custom exception or predefine exception. For example: Let’s say you want to throw invalidAgeException when employee age is less than 18. Create a Employee class as below. [crayon-68371941a6fce377642564/] Create InvalidAgeException class as […]

    Read More
  • Core Java interview Exception Handling
    19 October

    Exception handling in java

    Exceptions I have started writing about the and how to prepare for the various topics related to OCAJP exams in my blog. In my previous post, I have published few sample mock questions for StringBuilder class. In this post I am going to explain about the another OCAJP exam objective “Differentiate among checked exceptions, unchecked […]

    Read More
  • Core Java interview Exception Handling
    17 July

    How to create custom exception in java

    In this post, we will see how to create custom exception in java. It is very simple to create custom exception in java. You just need to extends Exception class to create custom exception. Lets understand this with example. You have list of counties and if You have “USA” in list of country, then you […]

    Read More
  • Core Java interview Exception Handling
    14 July

    Difference between checked and unchecked exception in java

    In this post, we will see difference between checked and unchecked exception in java. It is important question regarding exceptional handling. What is Exception? Exception is unwanted situation or condition while execution of the program. If you do not handle exception correctly, it may cause program to terminate abnormally. What is checked exception? Checked exceptions […]

    Read More
  • Core Java interview Exception Handling
    19 June

    Can We Have Try without Catch Block in Java

    In Java, it’s possible to use a try block without a catch block, but it must be followed either by a finally block or be part of a try-with-resources statement. Let’s see both cases with the help of examples: 1. try-finally Structure You can use a try block with a finally block. As you may […]

    Read More

Newsletter


Let’s be Friends

  • Facebook
  • Twitter
  • LinkedIn

© 2020-22 Java2Blog Privacy Policy