IsoChronology eraOf() method in Java with Example
The eraOf() method of java.time.chrono.IsoChronology class is used to retrieve the Iso Era by using numeric value 0 and 1 because IsoCronology contains only two HijrahEra.
public IsoEra eraOf(int eraValue)
Parameter: This method takes the eraValue integer as a parameter for which IsoEra is going to be generated.
Return Value: This method returns the Iso Era by using numeric value 0 and 1 because IsoCronology contains only two HijrahEra .
Below are the examples to illustrate the eraOf() method:
IsoEra is: BCE
IsoEra is: CE
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.