June 2017

Exception Handling – The try-with-resources statement

By | 2017-06-20T07:16:58+00:00 June 20th, 2017|Core Java|

Generally finally block is used to close all the resources (viz., file, database connection, socket or anything that should be closed after its task is done) to prevent any leaks. Sample code: public class ResourceMgt { public static void main(String[] args) { BufferedReader br = null; try { br = new BufferedReader(new FileReader(“C://test.txt”)); System.out.println(br.readLine()); } [...]

May 2017

September 2016

Introduction to lambda expressions

By | 2016-09-26T16:40:22+00:00 September 26th, 2016|Core Java|

In this article I will give you a quick introduction about one of Java 8’s new features: lambda expressions. I will show you what lambda expressions are and how can you utilize this new feature. […]

February 2016

Java virtual machine basics

By | 2016-02-15T18:02:01+00:00 February 15th, 2016|Core Java|

JVM is an abbreviated form of Java Virtual Machine. It is a Java byte code processing engine that converts Java byte code into machine language, which is then executed by the machine (computer). Java byte code is an intermediary language between Java and the machine on which it has to be executed, and this execution [...]

Java 8 lambda foreach List

By | 2016-02-12T12:05:10+00:00 February 12th, 2016|Core Java|

You must have heard about Lambda Expression introduced in Java 8. Soon we will cover detail topics on it. But now in this article i will show how to use Lambda expression to iterate Collection List. If you want to iterate over Map you can check Java 8 lambda foreach Map article. […]

Java 8 lambda foreach Map

By | 2016-02-12T11:58:32+00:00 February 12th, 2016|Core Java|

You must have heard about Lambda Expression introduced in Java 8. Soon we will cover detail topics on it. But now in this article i will show how to use Lambda expression to iterate Collection. […]

January 2016

Java Enum (Enumerations)

By | 2016-01-16T07:47:09+00:00 January 16th, 2016|Core Java|

In this article I’ll write about Java Enumerations which are the most elegant way to define and use constants in your application. This is the basic feature every one knows but there are some more which you might don’t know. […]

November 2015

Java String Split

By | 2015-11-01T10:24:01+00:00 November 1st, 2015|Core Java|

In java you might face a situation where you need to split String, based on some criteria. To fulfill this requirement Java has already provided two in-built methods to achieve this. […]

July 2015