Period normalized() example
Description
Period normalized()
returns a copy
of this period with the years and months normalized.
Syntax
normalized
has the following syntax.
public Period normalized()
Example
The following example shows how to use normalized
.
import java.time.Period;
//w w w.j av a 2 s . co m
public class Main {
public static void main(String[] args) {
Period p = Period.ofMonths(123);
Period l = p.normalized();
System.out.println(l);
}
}
The code above generates the following result.