Latest blog on category "Java"

A thread is a lightweight independent process.

Once in a while, there may come a feeling that you are stuck in the same job profile and living a monotonous professional life. This generally leads to the realization that a change in your profile is much needed.

It can be used to define final class, final method, final fields and final variable. It can be used in many context in java. Final keyword perform a important role in java programming.

Abstraction means show functionality and hide complexity. In object oriented programming functionality should be shown to user but complexity (code of the function) should be hidden for the user.


Its also provide a path to control the visibility of members like classes, variables and methods. Access specifiers is used for classes, constructor, variable, and method.


Program which contains private specifier for specific function or class or datatype, it can be accessible only for that class or function. It is not accessible by other class or assemblies.


As java and c# is the advance version of C . So, most of the syntax is same as C . But there is some variation which we are dealing in this article.


The loop initialization is the first part where we initialize our counter to a starting value. The initialization is executed before the loop begins.

A function is defined as a group of code which can be called anywhere. This eliminates the need of writing the same code again and again. Functions enable a programmer to divide a program into a number of small functions.

if statement is the statement that enables JavaScript to make decisions and execute statements only if condition is true.

One of the major goals of any IDE such as NetBeans or Eclipse is to enhance ease of development.


One of the important set of classes comprised in Java API is the package. This is one of the core packages of the Java language and was a part of JDK 1.0.


The PushbackInputStream class comes under the category of FilterInputStream classes.

J2SE 5.0 introduced a new feature called autoboxing and unboxing that automatically converts between the primitive data types and their wrapper classes.


We will now discuss the LiveData program mentioned earlier to illustrate the use of these classes. But before that lets see the case of NYSE and NASDAQ once again from previous post:

In the previous posts, we got an introduction to byte-oriented stream classes, where we used the

The Java I/O library provides classes that allow us to read or write a user-defined object from or to a stream. The two classes:

Here we discuss another important class in the I/O package. The class provides an abstract representation of a file or directory on the host file system.


The File Concatenation program, as the name suggests, concatenates the contents of a given number of files. We specify the files on the command line as a variable argument list.

The Line Count program counts the number of lines in the specified text file. Java provides a class called LineNumberReader for this purpose. The LineNumberReader class wraps the BufferedReader class, which in turn wraps the Reader class.

Let’s write a utility called File Viewer that accepts the name of a character file on the command line and displays its contents to the user console.


Just the way binary streams operate on binary files, the character streams operate on character files—that is, text files such as .txt, .odt, and .docx.


The simplest way to determine the length of a physical file is to open it in binary mode.


A quick look at the program tells us that the CentralizedExceptionHandlerApp class has three methods:

Sometimes, the checked exceptions are also called compile-time exceptions because our code would not compile if we do not handle a checked exception.


Enter your email address here always to be updated. We promise not to spam!