LocalDate class in Java 8 represents a local date without timezone and time of that day and difference between a java.util.Date and java.time.LocalDate is that the instances of java.util.Date are mutable and the instances of LocalDate are immutable and thread-safe.

LocalDate provides the APIs which create the Current Date and Specific Date and provide the method to get Year, Month, Day, Add or Subtract Days, Months, Weeks, Years, compare the LocalDate objects and Get Number of Days from Month or Year from LocalDate also Check If a Given Year Is Leap Year or Not, Convert String to LocalDate and LocalDate to String.

static LocalDate now() - This method is used to get the current date from the system clock in the default time-zone.

static LocalDate now(Clock clock) - This method is used to get the current date from the specified clock.

static LocalDate now(ZoneId zone) - This method is used to get the current date from the system clock in the specified time-zone.

static LocalDate of(int year, int month, int dayOfMonth) - This method is used to get an instance of LocalDate from a year, month and day.

Month getMonth() - This method is used to get the month of year using the Month enum.

int getMonthValue() - This method is used to get the month of year from 1 to 12.

int getYear() - This method is used to get the year.

int getDayOfMonth() - Gets the day of-month field.

DayOfWeek getDayOfWeek() - This method is used to get the day of week which is an enum DayOfWeek.

int getDayOfYear() - This method is used to get the day of year.

LocalDate plusDays(long daysToAdd) - This method is used to returns a copy of this LocalDate with the specified number of days added.

LocalDate plusMonths(long monthsToAdd) - This method is used to returns a copy of this LocalDate with the specified number of months added.

LocalDate plusWeeks(long weeksToAdd) - This method is used to returns a copy of this LocalDate with the specified number of weeks added.

LocalDate plusYears(long yearsToAdd) - This method is used to returns a copy of this LocalDate with the specified number of years added.

boolean isAfter(ChronoLocalDate other) - This method is used to checks if this date is after the specified date.

boolean isBefore(ChronoLocalDate other) - This method is used to checks if this date is before the specified date.

boolean isEqual(ChronoLocalDate other) - This method is used to checks if this date is equal to the specified date.

int lengthOfMonth() - This method is used to returns the length of the month represented by this date.

int lengthOfYear() - This method is used to returns the length of the year represented by this date.

boolean isLeapYear() - This method is used to checks if the year is a leap year, according to the ISO proleptic calendar system rules.

static LocalDate parse(CharSequence text) - This method is used to obtains an instance of LocalDate from a text string.

static LocalDate parse(CharSequence text, DateTimeFormatter formatter) - This method is used to obtains an instance of LocalDate from a text string using a specific formatter.

String format(DateTimeFormatter formatter) - Formats this date using the specified formatter.

Here is examples to demonstrate the usage of the LocalDate in java 8.

package com.javatutsworld.stream;

import java.time.Clock;
import java.time.LocalDate;
import java.time.Month;
import java.time.MonthDay;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;

public class LocalDatePrograme {
    public static void main(String[] args) {
        LocalDate lDate = LocalDate.now();
        System.out.println("print current date: "+lDate);

        LocalDate lDate1 = LocalDate.now(Clock.systemDefaultZone());
        System.out.println(lDate1);

        LocalDate lDate2 = LocalDate.now(Clock.system(ZoneId.of("Asia/Tokyo")));
        System.out.println(lDate2);

        LocalDate lDate3 = LocalDate.of(2019, Month.NOVEMBER, 29);
        System.out.println("print specific date: "+lDate3);

        LocalDate lDate4 = LocalDate.of(2019, 12, 13);
        System.out.println("print specific date: "+lDate4);      

        LocalDate lDate5 = LocalDate.now();
        System.out.println("print current Year : " + lDate5.getYear());
        System.out.println("print current Month : " + lDate5.getMonth().getValue());
        System.out.println("print current Day of Month : " + lDate5.getDayOfMonth());
        System.out.println("print current Day of Week : " + lDate5.getDayOfWeek());
        System.out.println("print current Day of Year : " + lDate5.getDayOfYear());

        LocalDate lDate6 = LocalDate.now();

        // plus/minus methods
        System.out.println("print date after adition of days : " + lDate6.plusDays(7));
        System.out.println("print date after subtraction of days : " + lDate6.minusDays(4));
        System.out.println("print date after addition of months : " + lDate6.plusMonths(25));
        System.out.println("print date after subtraction of months : " + lDate6.minusMonths(10));
        System.out.println("print date after addition of weeks : " + lDate6.plusWeeks(40));
        System.out.println("print date after subtraction of weeks : " + lDate6.minusWeeks(35));
        System.out.println("print date after addition of years : " + lDate6.plusYears(4));
        System.out.println("print date after subtraction of years : " + lDate6.minusYears(3));

        LocalDate lDate7 = LocalDate.of(2017, Month.MAY, 14);
        LocalDate lDate8 = LocalDate.of(2017, Month.MAY, 14);
        LocalDate lDate9 = LocalDate.of(2016, Month.MAY, 15);

        // isEqual()check
        if (lDate8.isEqual(lDate9)) {
            System.out.println("lDate8 and lDate8 are equal");
        } else {
            System.out.println("lDate8 and lDate8 are not equal");
        }   

        if (lDate7.isEqual(lDate8)) {
            System.out.println("lDate7 and lDate8 are equal");
        } else {
            System.out.println("lDate7 and lDate8 are not equal");
        }   

        LocalDate dob = LocalDate.of(2011, Month.SEPTEMBER, 9); 
        MonthDay birthday = MonthDay.of(dob.getMonth(), dob.getDayOfMonth()); 
        MonthDay currentMonthDay = MonthDay.from(LocalDate.now()); 
        if(currentMonthDay.equals(birthday)){ 
            System.out.println("Happy Birthday !!"); 
        }
        else { 
            System.out.println("Sorry, today is not your birthday"); 
        }

        // ifAfter() check
        if (lDate8.isAfter(lDate9)) {
            System.out.println("lDate8 comes after lDate9");
        }
        else {
            System.out.println("lDate8 does not come after lDate9");
        }  
        if (lDate9.isAfter(lDate8)) {
            System.out.println("lDate8 comes after lDate9");
        }
        else {
            System.out.println("lDate8 does not come after lDate9");
        } 
        // isBefore() check
        if (lDate9.isBefore(lDate8)) {
           System.out.println("lDate9 comes before lDate8");
        }

        LocalDate lDate10 = LocalDate.of(2019, Month.MARCH, 1);
        LocalDate lDate11 = LocalDate.of(2016, Month.FEBRUARY, 1);
        // days in a month
        System.out.println("print number of days in " + lDate10.getMonth() + " : " + lDate10.lengthOfMonth());

        // days in a year
        System.out.println("print number of days in " + lDate10.getYear() + " : " + lDate10.lengthOfYear());

        if (lDate10.isLeapYear()) {
            System.out.println(lDate10.getYear() + " is a leap year");
        } else {
            System.out.println(lDate10.getYear() + " is not a leap year");
        }
        if (lDate11.isLeapYear()) {
            System.out.println(lDate11.getYear() + " is a leap year");
        } else {
            System.out.println(lDate11.getYear() + " is not a leap year");
        }

        // convert string to LocalDate in yyyy/MM/dd pattern, dd-LL-yyyy pattern and yyyy/dd/MM
        LocalDate lDate12 = LocalDate.parse("2019/12/13", DateTimeFormatter.ofPattern("yyyy/MM/dd"));
        System.out.println("print date after converting string to LocalDate: "+lDate12);

        DateTimeFormatter lDate13 = DateTimeFormatter.ofPattern("dd-LL-yyyy");
        System.out.println("print date after converting string to LocalDate: "+lDate13.format(lDate12));

        DateTimeFormatter lDate14 = DateTimeFormatter.ofPattern("yyyy/dd/MM");
        System.out.println("print date after converting string to LocalDate: "+lDate14.format(lDate12));

        // converting LocalDate to string in yyyy/MM/dd pattern, dd-LL-yyyy pattern and yyyy/dd/MM
        LocalDate lDate15 = LocalDate.of(2019, Month.NOVEMBER, 29);
        DateTimeFormatter dateFormatter1 = DateTimeFormatter.ofPattern("yyyy/MM/dd");
        System.out.println("print date after converting LocalDate to string : "+lDate15.format(dateFormatter1));

        DateTimeFormatter dateFormatter2 = DateTimeFormatter.ofPattern("dd-LL-yyyy");
        System.out.println("print date after converting LocalDate to string : "+lDate15.format(dateFormatter2));

        DateTimeFormatter dateFormatter3 = DateTimeFormatter.ofPattern("yyyy/dd/MM");
        System.out.println("print date after converting LocalDate to string : "+lDate15.format(dateFormatter3));

    }
}

Output:

print current date: 2019-12-04
2019-12-04
2019-12-04
print specific date: 2019-11-29
print specific date: 2019-12-13
print current Year : 2019
print current Month : 12
print current Day of Month : 4
print current Day of Week : WEDNESDAY
print current Day of Year : 338
print date after adition of days : 2019-12-11
print date after subtraction of days : 2019-11-30
print date after addition of months : 2022-01-04
print date after subtraction of months : 2019-02-04
print date after addition of weeks : 2020-09-09
print date after subtraction of weeks : 2019-04-03
print date after addition of years : 2023-12-04
print date after subtraction of years : 2016-12-04
lDate8 and lDate8 are not equal
lDate7 and lDate8 are equal
Sorry, today is not your birthday
lDate8 comes after lDate9
lDate8 does not come after lDate9
lDate9 comes before lDate8
print number of days in MARCH : 31
print number of days in 2019 : 365
2019 is not a leap year
2016 is a leap year
print date after converting string to LocalDate: 2019-12-13
print date after converting string to LocalDate: 13-12-2019
print date after converting string to LocalDate: 2019/13/12
print date after converting LocalDate to string : 2019/11/29
print date after converting LocalDate to string : 29-11-2019
print date after converting LocalDate to string : 2019/29/11