Here you can find the source of dateToString(LocalDate date, DateTimeFormatter formatter)
public static String dateToString(LocalDate date, DateTimeFormatter formatter)
//package com.java2s; //License from project: Open Source License import java.time.LocalDate; import java.time.format.DateTimeFormatter; public class Main { public static String dateToString(LocalDate date) { return String.valueOf(date); }/* w w w .j av a 2 s . c o m*/ public static String dateToString(LocalDate date, DateTimeFormatter formatter) { if (date != null) { return formatter.format(date); } return null; } }