JAVA DATE TIME API / NOTES</>↗Java Date Time API09 Mar 2016
In this example we are going to learn how to implement a custom TemporalAdjuster. We are going to create TemporalAdjuster to find the next working day from a specified date. We will use 5 working days, from Monday to Friday. The custom temporal adjuster class should implement the TemporalAdjuster interface, which define a single method […]
CORE API / NOTES</>↗Core API07 Mar 2016
In this example we are going to learn to use a java.util.Formatter to format negative number in parentheses. The Formatter can use a format flags to format a value. To display a negative number in parentheses we can use the ( flag. This flag display negative number inside parentheses instead of using the – symbol. […]
JAVA 8 / NOTES</>↗Java 806 Mar 2016
In the previous example we manipulate the value of LocalDate by adding or subtracting the value of date object by days, months, years using methods like plusMonths() or minusDays(). Or by changing the year or the month of the date object using methods like withYear() or withMonth(). But there are times that we want to […]
MAVEN / NOTES</>↗Maven29 Feb 2016
Sometimes when the required libraries / dependencies is not available in the Maven Central Repository we need to manually install it to our local repository. This library must be placed in the correct directory in our local repository to enable Maven to find it. The default location is under the ${user.home}/.m2/repository. To make this job […]
JAVA 8 / NOTES</>↗Java 826 Feb 2016
In the following example we will learn how to manipulate a LocalDate object. There are many methods available for us to change the value of a LocalDate object. For example, we can change the year, month and day of LocalDate object. We can use methods like withYear(), withDayOfMonth(), plusYears(), minusMonths(), etc. All these methods will […]
OS X / NOTES</>↗OS X22 Feb 2016
I need to test FTP client codes, so I need to find an FTP server for testing my codes. After searching for a while I find out that OS X already equipped FTP server. I am currently using OS X El Capitan 10.11.*. Let’s now test the FTP server on Mac OS X with the […]