Introduction Here I am going to show you how to insert line break in excel cell data using Apache POI in Java language. There may be requirements where you need to write long text in a cell or in multiple cells of excel file, but the long text is not fit within the view port…

Posted in Excel Java

Apache POI Insert Line Break In Excel Cell Data

Introduction In this example I am going to show you how to convert date from one format to another format in Java programming language. There are many situations where you need to convert date format in your Java based application from one format to another format. You can use prior to Java 8 and Java…

Posted in Java

Convert Date From One Format To Another Format In Java

Introduction In this short example code I will show you how to create a new file for writing into it or if the file already exists then append to it instead of creating a new file using Java programming language. If you have a requirement that either you need to log some data into an…

Posted in File Java

Write Or Append To A File Using Java

Table of Contents Introduction Prerequisites Project Setup Detect Hidden Rows/Cells in Excel Java Code Testing Hidden Rows/Cells Source Code Introduction Here in this example I am going to show you how to detect hidden rows in excel file using Apache POI library with the help of Java program. The following data are used in the…

Posted in Excel Java

Detect Hidden Rows In Excel File Using Apache POI

Table of Contents Introduction Prerequisites Project Setup Protect PDF using Password Testing Encrypted PDF Files Source Code Introduction This example is going to show you how to make pdf files password protected using Java programming language. Many applications require dynamic generation of PDF documents for reporting purpose, such as, generating statements for customers, readers buying…

Posted in Java

Make PDF Files Password Protected Using Java

Introduction In this example I am going to show you how to call REST APIs using javax.net.ssl.HttpsURLConnection. So, I am using plain Java code to send or receive data to or from the REST APIs. I am also going to show you how to send authentication token in the HTTP header. I am also going to…

Posted in Java REST

HttpsUrlConnection REST API Call – Auth Token And Proxy Server

Introduction Here in this example, I am going to show you how to create Spring Boot profile based logging. For any applications logging is an important things which will help you to debug through your application errors or issues and you can fix them easily by analyzing those errors or issues from the log files….

Posted in Log4J Spring Boot

Spring Boot Profile Based Logging

Introduction Apache POI is the most popular library when comes to manipulate word, excel, ppt based documents. In this example I am going to show you how to read large excel file using Apache POI library. Your large excel file may contain various kind of information, such as, Human Resource data, Sales data, Credit Cards,…

Posted in Excel File Java

How To Read Large Excel File Using Apache POI

In this example you will see what are Predicate and Function functional interfaces in Java 8 or later version of Java. Functional interfaces provide target types for lambda expressions and method references. Each functional interface has a single abstract method, called functional method for that functional interface, to which the lambda expression’s parameter and return…

Posted in Java

Predicate and Function functional interfaces in Java 8 or later

This example will show you what is a pangram and how to check a string is a pangram in Java program. A string is a pangram if it contains all letters or characters of alphabets (a to z or A to Z). A pangram or holoalphabetic sentence is a sentence using every letter of a…

Posted in Java

Check a String is a Pangram in Java

Introduction The ELK Stack is made of three open-source products: 1) Elasticsearch, 2) Logstash, and 3) Kibana. Elasticsearch: It is a NoSQL database which is based on the open-source search engine called Lucene. So Elasticsearch is a search and analytics engine. Logstash: It is a data processing pipeline tool which accepts inputs from (multiple) sources,…

Posted in Log4J Spring Boot

ELK Stack Integration with Spring Boot Applications

In this example I am going to show you how to find all paths from root to leaf nodes in binary tree. So I am going to find each path from root to leaf node using Java program. A binary tree is a non-linear data structure type tree with at most two children for each…

Posted in Java

Find All Paths from Root to Leaf Nodes in Binary Tree using Java