heartin's blog

Packages in Java

Packages are used in Java for organizing your class files. It can be considered as different folders to organize your files within your file system. You can put related class files together in one package. Java groups predefined classes into different packages like java.lang, java.util, java.io etc.

Wrapper classes, Auto-boxing and Auto-unboxing

Wrapper classes

The wrapper classes provide a mechanism to "wrap" primitive values in an object so that the primitives can be included in activities only for objects, like being added to Collections. There is a wrapper class for every primitive in Java. The wrapper class for int is Integer and the class for float is Float and so on. Wrapper classes also provide many utility functions for primitives like Integer.parseInt().

Association vs Aggregation vs Composition

In object oriented programming or in Unified Modelling, relationships between objects can be classified as association, aggregation, composition and inheritance. 

 

Association

Association is a relationship between two objects. Here objects might not be completely dependent on each other.

Writing Custom Exceptions in Java

Custom Exceptions are user defined Exception classes that extend either Exception class or RuntimeException class.

Introduction to Exceptions in Java

An exception is a divergence from an application’s normal behavior. Read about exception hierarchy in Java, checked and unchecked exceptions, and how to handle exceptions in Java.

Methods in Java

A class represent the properties and behabiour of an object. An methods represent these behaviours.

Variables and Data Types in Java

A variable is something that can hold some data. Class variables or static variables belong to class. Instance variables are non-static variables belong to objects. Local variables are local within blocks or methods and they die when we exit that block or method.

Downloading, Installing and Configuring Java First Time

Here we will discuss the details of downloading, installing and configuring java for first time. You will first find the steps in writing followed by complete screenshots of these steps as a slideshow.

JDK, JRE, JVM, and Your First Java Program

Read about JDK, JRE, JVM, classes, objects and methods in brief and write, compile and execute your first java program. Discusses why Java is called as a compiled interpreted language and also why java is platform independent.

Enumeration, Iterator and ListIterator in Java

Both Enumeration and Iterator are interfaces in Java for getting successive elements. Enumeration is older while iterator was introduced later with some improvements. Iterator has taken the place of Enumeration in the Java collections framework. ListIterator is a sub-interface of Iterator and allows the programmer to traverse the list in either direction, modify the list during iteration, and obtain the iterator's current position in the list. 

Pages

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!