• 22 April

    How to calculate difference between two dates in java

    In this post, we will see how to calculate difference between two dates. Sometimes we have requirement to find no. of days between two dates or no. of hours between two dates. Java Program: package com.org.arpit.java2blog; import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.Date; /** * @author java2blog.com * Arpit Mandliya * */ public class DateDiff { […]

  • Java Collections interview questions
    12 April

    Java Collections interview questions and answers

    In this post, I am going to share some of logical java Collections interview questions which will help to understand Collections concepts better. For an extensive list of java programs, please go to Java interview programs. Question 1: What can be output of below code : package org.arpit.java2blog; import java.util.HashSet; class Country { private String […]

  • 01 April

    How to check if linked list is palindrome in java

    In this post, we will see how to check if linked list is palindrome or not. Java Linked List Interview Programs: How to reverse a linked list in java How to reverse a linked list in pairs in java How to find middle element of linked list in java How to detect a loop in […]

  • 01 April

    Java program to reverse linked list in pairs

    If you want to practice data structure and algorithm programs, you can go through data structure and algorithm interview questions. This is one of popular interview question. In this post, we will see how to reverse linked list in pairs. Java Linked List Interview Programs: How to reverse a linked list in java How to reverse […]

  • 28 March

    AngularJS Restful web service example using $http

    This post is in continuation with AngularJS web services tutorial Introduction to web services Web services interview questions SOAP web service introduction RESTful web service introduction SOAP web service example in java using eclipse JAX-WS web service eclipse tutorial JAX-WS web service deployment on tomcat Create RESTful web service in java(JAX-RS) using jersey RESTful web […]

  • 18 February

    Working with formulas in excel using Apache POI in java

    Java Apache POI tutorial: Read excel files in java using POI Write excel files in java using POI Working with formula in excel using POI How to set style in excel using POI In this post, we will see how to set and evaluate formulas in excel using Apache POI. Set formula for a cell: […]

  • 17 February

    How to set style in excel using Apache POI in java

    In this post , we will see how to set style in excel using apache poi. You can put cell style with below code: // create font XSSFFont font= workbook.createFont(); font.setFontHeightInPoints((short)10); font.setFontName("Arial"); font.setColor(IndexedColors.WHITE.getIndex()); font.setBold(true); font.setItalic(false); // Create cell style CellStyle style=workbook.createCellStyle();; style.setFillPattern(CellStyle.SOLID_FOREGROUND); style.setAlignment(CellStyle.ALIGN_CENTER); // Setting font to style style.setFont(font); // Setting cell style cell.setCellStyle(style); Java […]

  • 15 February

    How to write Excel files in java using Apache POI

    In this post, we will see how to write excel in java using Apache POI example. About Apache POI project : The Apache POI Project’s mission is to create and maintain Java APIs for manipulating various file formats based upon the Office Open XML standards (OOXML) and Microsoft’s OLE 2 Compound Document format (OLE2). In short, […]

  • 13 February

    How to read excel files in java using Apache POI

    In this post, we will see how to read excel in java using Apache POI example. About Apache POI project : The Apache POI Project’s mission is to create and maintain Java APIs for manipulating various file formats based upon the Office Open XML standards (OOXML) and Microsoft’s OLE 2 Compound Document format (OLE2). In […]

Subscribe to our newletter

Get quality tutorials to your inbox. Subscribe now.