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

How To Resolve java.lang.IllegalAccessException

April 24, 2014 by Krishna Srinivasan Leave a Comment

This example shows when the java.lang.IllegalAccessException is thrown in your application. When an application tries to reflectively create an instance (other than an array), set or get a field, or invoke a method, if that method is not accessible to your application (probably the modifier is private or not accessible one), then your application will […]

Filed Under: Java Tagged With: Java Exceptions, Java Lang

NullPointerException in Java

March 17, 2014 by Krishna Srinivasan Leave a Comment

One of the most common and nightmare for the Java programmers are getting the NullPointerException while running the Java application. This exception is defined at the “java.lang” package and the purpose of the exception is to detect if an object is used without any content. Here you must understand the difference between Reference and Object. […]

Filed Under: Java Tagged With: Java Exceptions, Java Lang

How To Get JVM Start Time And Date

March 17, 2014 by Krishna Srinivasan Leave a Comment

This example shows how to get the start time and date for the current execution environment of Java Virtual Machine (JVM). RuntimeMXBean in the Java lang package helps in getting the details of the JVM start time. By invoking the method getStartTime() in RuntimeMXBean class, it returns the time in long number which can be […]

Filed Under: Java Tagged With: Java Lang, JVM

java.lang.ArrayIndexOutOfBoundsException

March 15, 2014 by Krishna Srinivasan Leave a Comment

One of the feature in the Java programming language is usage of arrays. The advantage of using arrays is to store the large number of values and retrieve them using the index values. Each array is treated as an object itself. Each array has the fixed number of elements and it will not be changed […]

Filed Under: Java Tagged With: Core Java, Java Exceptions, Java Lang

java.lang.NoSuchMethodError

March 15, 2014 by Krishna Srinivasan Leave a Comment

NoSuchMethodError is thrown when a Java class trying to invoke a method from another class which is not exist. Typically, this error has to be caught at the compile time. However, this error also thrown at run time when class has incompatibly changed. This error is sub class of java.lang.IncompatibleClassChangeError. This class inherited from the […]

Filed Under: Java Tagged With: Core Java, Java Exceptions, Java Lang

Java equals() and hashcode()

March 13, 2014 by Rengasudharsan Srinivasan Leave a Comment

This tutorial explains the equals() and hashcode() method in simple terms. It is one of the confusing questions on the Java developer’s mind. The common questions asked about these methods are: What is equals() method and why should I override that in our classes? What is hashcode() method? Why should I always override hashcode() when […]

Filed Under: Java Tagged With: Core Java, Java Lang

Java Math.random() Example

March 13, 2014 by Krishna Srinivasan Leave a Comment

In Java, there is a method random() in the Math class, which returns a double value between 0.0 and 1.0. Note that the default random numbers are always generated in between 0 and 1. If you want to get the specific range of values, the you have to multiple the retruned value with the magnitue […]

Filed Under: Java Tagged With: Core Java, Java Lang

Comparable vs Comparator Interface in Java

March 9, 2014 by Rengasudharsan Srinivasan Leave a Comment

This is an interesting topic in Java and can be confusing to many Java developers. So I plan to give some common examples to illustrate the differences. Going by the topic name, these things are obvious to us: Both comparator and comparable are Java interfaces. Any class, which needs to use these interfaces, has to […]

Filed Under: Java Tagged With: Java Lang, Java Util

Java Strings, StringBuilder, StringBuffer

March 8, 2014 by Rengasudharsan Srinivasan Leave a Comment

Lets learn more about Strings in Java today. Java Strings are one of the most commonly used and hence we will explore about it in detail. Some of the key differences in Java Strings over other languages are: String is an object in Java and is part of the java.lang package. To invoke objects of […]

Filed Under: Java Tagged With: Java Lang, Java Strings

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.