Oracle Certified Associate: Java 8 default and static methods in interface

We all know about the default access modifier in Java. From Java 8, we can add default method(s) to an interface. The default methods are non abstract method which have implementation i.e. to say have a method body. A part from default, Java 8 also supports static method. Continue reading “Oracle Certified Associate: Java 8 default and static methods in interface”

Oracle Certified Associate: Java 8 Maniplating Date and Time

In last post on java.time package basics we saw how to create date and time objects. In this post we will see how to manipulate date and time objects.
From previous post we know how to create Date object, lets us try to get month, year and date from the object. Continue reading “Oracle Certified Associate: Java 8 Maniplating Date and Time”

Oracle Certified Associate: Java 8 Date and Time

Java 8 introduces new package for date and time due to many flaws in old version of date and time classes. New package is added named time in java package repository. We required to have basic knowledge about java.time package for Oracle Certified Associate Exam for Java 8. Continue reading “Oracle Certified Associate: Java 8 Date and Time”

Oracle Certified Associate: Java 8 Formatting Date and Time

In previous post we learned how to manipulate date and time object. In this post we will see how to parse and format the date and time.
For formatting date and time in Java 8 DateTimeFormatter is used which belongs to java.time.format package. It is used to parse the string in to date and time and also used to print the date time in desired format, all date time related class provides two methods for the same viz parse and format. Continue reading “Oracle Certified Associate: Java 8 Formatting Date and Time”