Skip to content

Instantly share code, notes, and snippets.

View iamrdn's full-sized avatar
🎯
Focusing

Dhanu N Joy iamrdn

🎯
Focusing
View GitHub Profile
@iamrdn
iamrdn / Java8DateTimeExamples.java
Created December 21, 2019 22:18 — forked from mscharhag/Java8DateTimeExamples.java
Examples for using the Java 8 Date and Time API (JSR 310)
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.time.format.FormatStyle;
import java.time.temporal.ChronoUnit;
import java.time.temporal.TemporalAdjusters;
import java.util.*;
import static java.time.temporal.TemporalAdjusters.*;
public class Java8DateTimeExamples {
@iamrdn
iamrdn / ReadWriteExcelFile.java
Created December 21, 2019 22:14 — forked from madan712/ReadWriteExcelFile.java
Read / Write Excel file (.xls or .xlsx) using Apache POI
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
@iamrdn
iamrdn / BadSIngleton.java
Created December 21, 2019 21:16
This is called early initialization as the singleton object is initialized when the class is loaded. The singleton object can be created when actually required, to same resources, as shown below.
public class BadSingleton{
private static BadSingleton mInstance;
private BadSingleton() {
}
public static BadSingleton getInstance(){
@iamrdn
iamrdn / README.md
Created January 4, 2019 12:18 — forked from hofmannsven/README.md
My simply Git Cheatsheet