Tag: Java 8

Core Java

OCA Java 8 Preparation : DateTimeFormatter

Introduction : DateTimeFormatter class belongs to java.time.format package. You can use it to format or parse the date or time or a datetime object. Remember for the sake of exam, it defines rules for both parsing and formatting. To instantiate a DateTimeFormatter, use any of the below ways : Calling the static ofLocalizedXXX() method, passing […]

Be the First to comment. Read More
Core Java

OCA Java 8 Preparation : Lambda Expressions

  The concept of Lambda expressions and Functional Interface(FI) is itself very large in scope. However, for the OCA Java 8, you are expected to know only the basics of Lambda Expression. Today, we’ll cover lambda expressions in great details for your Java OCA exam. To understand why to even use lambda expressions , you […]

Be the First to comment. Read More
Core Java

Java 8 – Why use Lambda Expressions?

Introduction : Java 8 introduced the concept of Lambda expressions which enables you to implement functional-style programming in Java. Functional programming allows you to focus on ‘what to do’, rather than ‘how to do it’. It allows you to pass in code blocks as a method argument, instead of simply passing the data. This can […]

Be the First to comment. Read More
Core Java

OCA Java 8 Preparation : Period

In continuation of this post covering the temporal classes – LocalDate, LocalTime and LocalDateTime, today we’ll be covering the Period class which is also on the OCA Java 8 Exam. Creating Period instances : Period class also belongs to java.time package. It represents a date-based amount of time in terms of years, months, and days […]

Be the First to comment. Read More
Core Java

OCA Java 8 Preparation : Date Time API

Below are the temporal classes that you are expected to know for your OCA Java 8 Certification Exam : java.time package : LocalDate : This class represents a date only in terms of date – based values(year, month, day). Time-zones aren’t handled. LocalTime : LocalTime represents only the time value(hours, minutes, seconds, nanoseconds ) within […]

Be the First to comment. Read More