Java Tutorial

Read XML File from Java

Consider the simple way to read data from an XML file into a Java  program. Company.xml contains root element as company and Total no of employee are 2 . Company.xml <company> <employee> <id>1020</id> ...
Java Tutorial

Static Initialization Block

When a class is loaded, all blocks that are declared static and don’t have function name (i.e. static initializers) are executed even before the constructors are executed. As the name suggests they are ...
Java Tutorial

Java memory management and heapstack

Java’s memory management (i.e. Garbage Collection) prevents lost references and dangling references but it is still possible to create memory leaks in other ways. If the application runs with memory ...
Java Tutorial

Abstract class

In design,  want the base class to present only an interface for its derived classes. This means,  don’t want anyone to actually instantiate an object of the base class.  Only want to upcast to it ...
Java Tutorial

Access levels

Java provides a following access modifiers to access levels for classes, variables, methods and constructors. The four access levels are: Default : Visible to the package. the default. No modifiers ...
Java Tutorial

packages

Packages  helps resolve naming conflicts when different packages have classes with the same names. This also helps you organize files within your project. For example: java.io package do something related ...
Java Tutorial

Java Hello World

This article explains on how to create a hello world program in Java using Eclipse IDE. This is meant for java beginners and programmers new to java. Prerequisites : install the JDK Install the Eclipse Java ...
Java Tutorial

Simple class and objects

Java is an Object Oriented Language. Java has evolved over the concept of OOPS and has now surpassed the other Object Oriented languages like C++. It is extensively used in building enterprise level application ...
Java Tutorial

Constructor chaining

Initialization of each constructor starts one by one is calle as Constructor chaining. Constructor chaining is nothing but  the use of inheritance. A subclass constructor method’s  call its superclass’ ...
Java Tutorial

The Unary Operators

The unary operators requires only one operand to perform different kind of operations such as increasing/decreasing a value, negating an expression, or inverting a boolean value. These operators can ...
Java Tutorial

Static variable management in java

  The purpose of static keyword in java is  memory management. Static keyword can be apply to the  variables, methods and blocks. The static keyword belongs to the class than instance ...
Java Tutorial

Local variables and Pass by value in java

Local variables are declared in methods, constructors, or blocks. Local variables are used extensively in Java Progrramming language. Mentioned below are some of the key points related to Local variables ...
Page 1 of 212
Powered by WordPress · Designed by Theme Junkie
You might also likeclose