Guava EventBus Spring

Guava EventBus Spring

Guava EventBus Spring In last two tutorial you saw how to get started with Google Guava EventBus. In this I will show you how to integrate Guava EventBus with Spring framework. If you are seriously looking to integrate Guava EventBus … Continue reading

Guava Custom EventBus Example

Guava Custom EventBus Example

Guava Custom EventBus Example Last tutorial you saw how to use Google Guava EventBus after registering subscriber. In this example we will create CustomEventBus class which will extend EventBus class and will use its register method inside constructor to register … Continue reading

SimpleDateFormat UTC Example

SimpleDateFormat UTC Example

SimpleDateFormat UTC Example SimpleDateFormat API available in JDK since 1.2 and mostly preferred by the developers to format date in different format. In this example you will how we can format date in UTC format:

LocalDateTime ZoneId example

LocalDateTime ZoneId example

LocalDateTime ZoneId example LocalDateTime class added in JDK 8 and here it gives date time without time zone in ISO-8601 calendar system and if you want to specify explicitly ZoneId to get the time please see example below:

DateTimeFormatter Java Example

DateTimeFormatter Java Example

DateTimeFormatter Java Example DateTimeFormatter is available in java.time.format package and include in JDK 8. This class formats and parse date time objects. Main advantage of this class is as below:

LocalDate Java Example

LocalDate Java Example

LocalDate Java Example This class has been introduced in JDK 1.8 which can be used without time-zone in the ISO-8601 calendar system and it will fetch local date based on the location.