MonthDay hashCode()
returns a hash code for this month-day.
hashCode
has the following syntax.
public int hashCode()
The following example shows how to use hashCode
.
import java.time.MonthDay; // www . jav a 2s . 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.