The States of a Thread in Java Suresh Seakr November 03, 2015 three thread states—new, runnable and terminated A program can access the state of the thread using Thread.State enumeration. The T... Read More
Concurrent Programming in Java Suresh Seakr November 03, 2015 Running multiple threads in parallel at the same time is called multi-threading or concurrency. The Object and Thread classes an... Read More
Custom Exceptions in Java Suresh Seakr November 02, 2015There are two options: you can extend either the Exception or RuntimeException class depending on your need. If you want to force the users... Read More
Exception Types in Java Suresh Seakr November 02, 2015Exception handling constructs such as the throw statement, throws clause, and catch clause deal only with Throwable and its subclasses. Ther... Read More
Try-with-Resources in Java Suresh Seakr November 02, 2015It is a fairly common mistake by Java programmers to forget releasing resources, even in the finally block. Also, if you’re dealing with mul... Read More
Exception Handling in Java Suresh Seakr November 02, 2015Java has built-in support for exceptions. The Java language supports exception handling in the form of the throw, throws, try, catch, and fi... Read More
Serialization in Java Suresh Seakr October 31, 2015The classes ObjectInputStream and ObjectOutputStream support reading and writing Java objects that you use in the program. The process of co... Read More
Reading a Byte Stream in Java Suresh Seakr October 31, 2015Byte streams are used for processing files that do not contain human-readable text. A .class file is meant for processing by the JVM, hence ... Read More
Using Streams to Read and Write Files in Java Suresh Seakr October 30, 2015Streams are ordered sequences of data. Character Streams and Byte Streams Consider the difference between Java source files and class files... Read More
Reading and Writing from Console in Java Suresh Seakr October 30, 2015Console class will considerably simplify reading the data from the console and writing the data on the console. If the JVM is invoked indire... Read More
String Formatting in Java Suresh Seakr October 30, 2015You can use the C-style printf() (print formatted) method that was introduced in Java 5. The method printf() uses string-formatting flags to... Read More
Regular Expressions Suresh Seakr October 29, 2015A regular expression is a sequence of predefined symbols specified in a predefined syntax that helps you search or manipulate strings. Rege... Read More