Inner Classes

Reading Time: 1 minuteHi, This post is about Inner Classes, which could be useful when you are learning Lambda Expressions and Functional Programming in Java 8. Member Inner Class They can access private variables of outer class. public class MemberInnerClass { private int outer = 5; class Inner { private int inner =…

read more

Class Initialization

Reading Time: 2 minutesToday, I will briefly mention about the class initialization. When we execute any java program (e.g.: java InitTest), Java Virtual Machine loads and link the class, execute initializers, and invokes the main class. Initialization process has some rules. Before we go into the details, spend a few minutes to figure out the output. class…

read more

How to deal with nested conditionals (Part 2)

Reading Time: 2 minutesIn my previous post, I mentioned about Decomposing Conditional and Consolidate Conditional Expression for nested conditionals. The problem was not only the nested conditions but also duplicated code fragments and lots of null object controls.  In this post, we will cover Consolidate Duplicate Conditional Fragments and Testing Interface to tackle the above mentioned…

read more

Core Java APIs

Reading Time: 4 minutesHi, In this post, I will cover a some of the Core Java APIs (String, StringBuilder, Wrapper classes, and Date Time API) that we are responsible for Java 8 Programmer I exam. Immutability I think the first thing that we need to know is immutability. String class is immutable, meaning…

read more

Java Exceptions

Reading Time: 2 minutesHi, This section is about exception handling in Java. I will try to cover as much use cases as I can. The best way to learn exceptions is to play with different exception types, especially handling multiple exceptions, by yourself. We are responsible for following specific classes for Java 8…

read more