Suppose you want to create a list object in Java and populate it with some default elements, how would you go about coding it? One will pursue one of the following approaches: (If you have any other approach feel free to share them via the comments and we will update the post accordingly). In the …
Java 5.0
Introduction to Java Agents
In this article we will discuss about Java Agents. Java Agents are software components that provide instrumentation capabilities to an application. In the context of agents, instrumentation provides the capability of re-defining the content of class that is loaded at run-time. We will discuss this in more detail in the further sections. Download Source Code: …
Java 5.0
Java 5.0 Java Platform, Standard Edition (also known as Java 2 Platform) lets you develop and deploy Java applications on desktops and servers, as well as today’s demanding Embedded and Real-Time environments. Java SE includes classes that support the development of Java Web Services and provides the foundation for Java Platform, Enterprise Edition (Java EE). …
Precise rounding of decimals using Rounding Mode Enumeration
The Rounding Mode Enum in java.math package is used to perform precise rounding of decimal values. It was introduced in Java 5.0. This Enum provides various constants each of which is used for different modes of rounding. The decimal value would be rounded off to the number of decimal places based on the scale that …
Generics in Java 5.0
1) Introduction The feature of Generics in Java allows Applications to create classes and objects that can operate on any defined types. Programmers can now make use of the Generics feature for a much better code. There is no need for un-necessary casting when dealing with Objects in a Collection. This article provides a detailed …
New Features in Java 5.0
1) Introduction Java 5.0 comes with a bunch of useful features. In this article, we are going to have an overview of the features like Enhanced for-loop, Variable Arguments, Static Imports and Enumerations. Apart from these features, we have already published other notable features in Java 5.0, auto boxing, generics and annotations. If you are …
Annotations in Java 5.0
1) Introduction Annotations in Java is all about adding meta-data facility to the Java Elements. Like Classes, Interfaces or Enums, Annotations define a type in Java and they can be applied to several Java Elements. Tools which will read and interpret the Annotations will implement a lot of functionalities from the meta-information obtained. For example, …