Latest Posts

Java

Jun 14, 2017

tgugnani

A Java Enum is a special Class that is used to defined a collection of constants. An Enum can contain constant, methods, etc. It was added in Java 5. Enum Example Consider a simple example to unders...
Read Article

Java

Jun 14, 2017

tgugnani

Interface in Java defines a IS-A relationship between classes and a mechanism to achieve abstraction. An Interface only consist of method definition and not the method body.   Benefits of U...
Read Article

Java

Jun 8, 2017

tgugnani

Problem: Write a Java code to find the longest sequence of consecutive repetitive characters in a String. For example if a String is "aaaabbbbcccchhhhiiiiibbbbbbbbbccccccc" then your code should retur...
Read Article

Java

Jun 8, 2017

tgugnani

String Class in Java is most commonly used data type to Store sequence of characters and although it is not a primitive data type it is so closely available with Java Library that it's as good as a pr...
Read Article

Java

Jun 8, 2017

tgugnani

LinkedList in Java are a better alternative to Arrays, and provides almost all functionality that a ArrayList provides. LinkedList uses a doubly LinkedList to store and navigate the elements. This mea...
Read Article

Java

Jun 7, 2017

tgugnani

Autoboxing and unboxing is a mechanism provided by Java to automatically convert primitive Data Type into its corresponding Wrapper Class Object and vice versa. Consider the Code below of the probl...
Read Article

Java

Jun 7, 2017

tgugnani

ArrayList is part of Collections Framework in Java and is a implementation of List Interface. As opposed to Java Array of fixed size. ArrayList in Java are resizable-arrays and provide various utility...
Read Article

Java

Jun 7, 2017

tgugnani

As we have learned about Primitive Data Types and Classes in Java. It is a good time to dig into the details of String class in Java. String is a special Class in Java which is so closely bound with t...
Read Article

Java

Jun 7, 2017

tgugnani

Constructors are the special methods in Java which gets executed as soon as we create an object of the Class. To create a Constructor in Class, you need to create a method with name same as your Class...
Read Article

Java

Jun 7, 2017

tgugnani

Lets take a closer looks at methods in Java. As we have seen Class consist of state and behaviour. Methods are defined in Java Classes so alter the behaviour of objects. Let's consider a Java code...
Read Article