Data & Java

Full-Text Search with Apache Lucene 5.3.x/5.4.x

Before we delve into Apache Lucene, the following are the most important terms that you need to be familiar with. This will also help you clarify a few terms before getting into search or information retrieval: We'll start with Apache Lucene 5.3.x/5.4.y. The most important aspects of Lucene are mentioned under each heading. Apache Lucene introduction Apache Lucene is a high-performance, full-featured text search engine library written...

Create Entity Manager in JPA Tutorial

The Entity Classes It is easy to transform a POJO into an entity class via annotation. In fact, a single annotation, @Entity, is enough to designate any POJO as an entity class. For example, examine a regular class such as follows: public class Book {   private int id;   private String title; private String publisher; public Book() {} public Book(int...

Understanding Java Support for Persistence with JPA

Enterprise applications often deal with operations such as the collecting, processing, transforming, and reporting of a large amount of data. These data are typically stored in a database server in a particular location and retrieved on demand. The application is responsible for processing the data from the database and finally present them for client consumption. But, the intricacies involved in mitigating the data exchange...

An Introduction to JVM Threading Implementation

Green Thread Model The green thread is the simplest threading library of JVM scheduled threads. In this model, each thread is an abstraction within the VM. The JVM is completely responsible for its creation and manages the process of context switching within a single process of the operating system. In other words, green threads are the sole property of JVM and its implementation. The underlying...

What are the Serializable and Externalizable Interfaces in Java?

Overview The process of serialization converts the state of an object into a stream of bytes. If we want to store an object in a file, it is necessary to convert it into bytes. These bytes then can be restored into an object, its original form, with the process called deserialization. This is how object persistence takes place. The process of serialization also needs to...

Nested Classes and Their Use in Java

Overview In Java, it is possible to declare a class within another class. This is called a nested class. The visibility and scope of the nested class is bounded by the class within which it is declared. Thus, if a class B is declared within class A, it means that the existence of the class B is dependent on the existence of class A. Also,...

The Problems of Multiple Inheritance in Java

Inheritance is one of the primary capabilities of object-oriented programming (OOP) languages, such as Java. It is a fundamental technique for organizing classes in a manner that enhances the capability of class reuse in software design. Multiple inheritance is one of the many types of inheritance and is an important tenet of the inheritance mechanism. But, it is notorious for creating ambiguous relationships among...

Understand Static Modifiers in Java

The static keyword in Java has multiple connotations and can be associated with a field, method, or a class. The decision to declare a field, method, or a class as static is a key step in class design. The word specifically means something that is initiated during compilation. Anything designated as static is not meant for any dynamic purposes. In Java, we first encounter...

What Is Java Agent?

Java agents work at the lowest level by providing services that enable us to intrude into a running Java program in JVM. This powerful yet uncanny part of Java has the capability to crash JVM if done incorrectly. This article glimpses into the concept and gives an introduction on how it works. Overview The classes that represent Java agents are apparently nothing more than any other...

How to Use Reflection in Java Effectively

Reflection is a built-in mechanism to introspect a Java program at the time of execution. It can be used to inspect, modify, and transform a Java program without affecting existing code. This powerful feature can be used to expand the capabilities of a program, to examine the class or object internals at runtime. This article attempts to explore some of the intricacies and glimpses...

Latest Articles