MonthDay hashCode() example
Description
MonthDay hashCode()
returns a hash code for this month-day.
Syntax
hashCode
has the following syntax.
public int hashCode()
Example
The following example shows how to use hashCode
.
import java.time.MonthDay;
//from w w w.j ava 2 s. co m
public class Main {
public static void main(String[] args) {
MonthDay m = MonthDay.now();
System.out.println(m.hashCode());
}
}
The code above generates the following result.