Default methods allows us to add new functionality to new or existing interfaces without breaking the existing functionality of legacy code. Prior to Java 1.8 interfaces did not allow default interfaces and it was very difficult to modify an existing interface without impacting the class which implemented the interface.For instance if a new method is […]
Category Archives: Technology
Java Lambda Expressions
What are Lambda Expression? Lambda expressions were introduced in Java 1.8 and it’s the first step towards functional programming.Lambda expressions allow you to treat functionality as a method arguments.The functionality can be passed around to different methods as lambda expressions and executed on demand.It also make the code clean and concise. In short lambda expressions […]
Anonymous Class in Java
Anonymous classes can be tricky to understand for beginners.Mainly because the syntax can look verbose or at least it looked very confusing to me when I started my career as a java developer.So let’s talk anonymous classes today. Anonymous classes were introduced in java to make code more concise and reduce the lines of code.Here’s […]
How to Configure Java 1.8 On Windows
In this post I am going to explain how to install Java 1.8 on your machine and verify the same. Here’s the steps:- Install Java 1.8 You can install Java1.8 from Oracle website.Here’s the link:- https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html You will see there are two executable files for windows, one for 64 bit and another for 86 bit.Check […]
How to fix build error related to Jacoco Test Coverage
Code coverage is a software metric used to measure how many lines of code is executed during automated tests. Jacoco is a code coverage report generator for Java Projects. You need to add the maven plugin for jacoco and get the code coverage reports. Jacoco Plugin dependency in pom.xml:- You can also configure the code […]