• Menu
  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

JavaBeat

Java Tutorial Blog

  • 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)
  • 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)

Java Lang

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 …

Category: JavaTag: 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. …

Category: JavaTag: 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 …

Category: JavaTag: 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 …

Category: JavaTag: 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 …

Category: JavaTag: 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 …

Category: JavaTag: 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 …

Category: JavaTag: 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 …

Category: JavaTag: Java Lang, Java Util

  • Go to page 1
  • Go to page 2
  • Go to Next Page »

Primary Sidebar

Follow Us

  • Facebook
  • Pinterest

FEATURED TUTORIALS

np.zeros

A Complete Guide To NumPy Functions in Python For Beginners

What is new in Java 6.0 Collections API?

The Java 6.0 Compiler API

Introductiion to Jakarta Struts

What’s new in Struts 2.0? – Struts 2.0 Framework

JavaBeat

Copyright © by JavaBeat · All rights reserved
Privacy Policy | Contact