JavaBeat

  • Home
  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)
  • Privacy

Array Vs ArrayList in Java

March 3, 2016 by Krishna Srinivasan Leave a Comment

What is the difference between Array and ArrayList is the quite common question for the Java interview and for the beginners who are learning Java programming. I have started writing the Java best practices series, this is one of the post for clearing the air on misconception about popular Java classes Array and ArrayList. 1. Flexible […]

Filed Under: Java Tagged With: Java Basics

How To Use Source and Target Parameter in Java Compiler

February 15, 2016 by Krishna Srinivasan Leave a Comment

If you are a Java programmer, then one of the common question comes into mind is How do I compile for compatibility with older versions of Java?. When you run your Java  program with an older version of the Java runtime environment, you may get the following Java exception if you have not compiled with the right version of […]

Filed Under: Java Tagged With: Java Basics

Difference Between Abstract Class and Interface in Java

February 14, 2016 by Krishna Srinivasan Leave a Comment

One of the basic Java interview question is what is the difference between abstract class and interface. If you are a beginner in Java, you can not avoid this question in any Java interview to test your knowledge on Java OOPs concepts. In this short tutorial I will write down the difference between abstract class […]

Filed Under: Java Tagged With: Java Basics

Suppressed Exceptions in Java 7

November 20, 2015 by Krishna Srinivasan Leave a Comment

At any point of time only one exception can be thrown by a method per execution. In cases when more than one exception would be thrown from the method, one of them will be suppressed and not thrown by the compiler. This exception is known as the suppressed exceptions in Java. Additional Reading : Java […]

Filed Under: Java Tagged With: Java 7 Exceptions, Java Basics

Java Exceptions Tutorial

November 18, 2015 by Krishna Srinivasan Leave a Comment

In this tutorial I am going to explain Java exceptions in details and how to use them in the real applications. One of the important measure to assess the quality of your Java code is to review the exception handling and how exceptions scenarios are handled. If you have to write an efficient exception handling, […]

Filed Under: Java Tagged With: Java Basics

Downcasting In Java

April 26, 2014 by Krishna Srinivasan Leave a Comment

Upcasting is assigning the sub class reference object to the parent class which is allowed in Java. Downcasting is assigning parent class reference object to the sub class which is not allowed in Java. However, if you do downcasting, there will not be any compiler error. But, there will be runtime exception java.lang.ClassCastException. Then why […]

Filed Under: Java Tagged With: Java Basics

Static Nested Class In Java

April 26, 2014 by Krishna Srinivasan Leave a Comment

Static Nested classes are inner classes which are declared inside another class and also declared with static keyword. The main difference between inner class and static nested classes is that inner classes are non-static and static nested classes are static. Also known as static classes. Static nested classes can be accessed using the enclosing class […]

Filed Under: Java Tagged With: Java Basics

Static Initializer , Instance Initializer And Constructor In Java

April 25, 2014 by Krishna Srinivasan Leave a Comment

This example show the order of the Java initialization blocks. Java has static initializer, instance initializer and constructor for initializing the variables. These blocks are used for the different purposes and leads to confusion among the programmers. Order of the execution of these blocks are as follows: All Static Initializers executed in the same order […]

Filed Under: Java Tagged With: Java Basics

Instance Initializer In Java

April 25, 2014 by Krishna Srinivasan Leave a Comment

In my previous example I have explained how to use static initializer in Java.This example shows how to use the instance initializer block in Java. The following are the few features of instance blocks. Instance initializers are block of code with out any keyword keyword. The code which needs to be initialized will be put […]

Filed Under: Java Tagged With: Java Basics

Static Initializer In Java

April 24, 2014 by Krishna Srinivasan Leave a Comment

This example shows how to use the static initializer in Java. The following are the few features of static blocks. Static initializers are block of code with static keyword. These are executed when the class is loaded or accessed first time by any application. Only static variables can be initialized inside static blocks. Instance variables […]

Filed Under: Java Tagged With: Java Basics

  • 1
  • 2
  • 3
  • …
  • 6
  • Next Page »

Follow Us

  • Facebook
  • Pinterest
JavaBeat

FEATURED TUTORIALS

Servlet Life Cycle: Explanation

Servlet Life Cycle: Explanation

What is new in Java 6.0 Collections API?

The Java 6.0 Compiler API

The Java 6.0 Compiler API

Copyright © by JavaBeat · All rights reserved

This website uses cookies to ensure you get the best experience on our website. Learn more.