LocalDate ld = LocalDate.now();
System.out.println("Local Date "+ld);
LocalTime lt = LocalTime.now();
System.out.println("Local Time "+lt);`enter code here`
LocalDateTime timePoin = LocalDateTime.now();
System.out.println("Local Date&Time "+timePoin);
System.out.println("From LocalDateTime getting date only "+timePoin.toLocalDate());
System.out.println("From LocalDateTime getting time only "+timePoin.toLocalTime());
System.out.println("Manually setting date "+LocalDate.of(2012, Month.DECEMBER, 12));
System.out.println("Manually setting time "+LocalTime.of(17, 18));
System.out.println("String to date "+LocalDate.parse("2012-02-01"));
System.out.println("String to time "+LocalTime.parse("10:15:30"));
System.out.println("From LocalDateTime getting month only "+timePoin.getMonth());
System.out.println("From LocalDateTime getting year only "+timePoin.getYear());
System.out.println("From LocalDateTime setting and changing month and year "+timePoin.withDayOfMonth(1).withYear(2012));
System.out.println("Adding weeks to date "+timePoin.plusWeeks(3));
System.out.println("From LocalDateTime setting and changing date "+ timePoin.with(lastDayOfMonth()));
System.out.println("Truncation of milliSeconds "+timePoin.truncatedTo(ChronoUnit.SECONDS));
ZoneId id = ZoneId.of("Europe/Paris");
System.out.println("Zone id "+id);
ZonedDateTime zoned = ZonedDateTime.of(timePoin, id);
System.out.println("Zone date and time "+zoned);
Period period = Period.of(3, 2, 1);
LocalDate newDate = ld.plus(period);
System.out.println("After addingyears,months,days "+newDate);
String d = String.join(", ", a, b, c);
perList.stream().filter(e -> e.getAge() > 10).forEach(n -> perNewLList.add(n));
perNewLList.forEach(n -> System.out.println("Name" + n.getName() + " Age" + n.getAge()));
enter code here
int total = perList.stream().collect(Collectors.summingInt(Per son::getAge));
List<String> str1=perList.stream().map(Person::getName).collect (Collectors.toList());