Maven cheatsheet

Just a place for me to store handy bits and pieces. Having not used it for awhile to remind of things, I’ll likely to forget ! How to compile to different versions of Java ( see also https://mkyong.com/maven/maven-error-invalid-target-release-1-11/ )

In the <build> section How to change the output/target dir Handy if you want to … Read more

Threads in Java

We need to control access to shared state ( when multiple threads are at work ), to avoid unexpected results. In the case of the program below the shared state is the int sheepCount. 10 different threads call the method incrementAndReport() . Without thread management 

Output ( wonky ) Every thread is trying to … Read more

How Lambdas can be useful in Java

I’m revising for the OCP (Oracle Certified Professional Java Programmer ), and running over Lambdas at the moment. In tutorials I see many of them seem to focus on what they are , what they do , streams etc. Not much on how they can be used to improve code ( and making less Class … Read more

Installing ChromeDriver for WebDriver – For the Techies (Java)

If your using Webdriver to automate your web testing you’ll already know what a great tool it is. This is a quick note on installing ChromeDriver for WebDriver (to test using the Chrome Browser). 1. get the latest version of chrome driver from this url http://chromedriver.storage.googleapis.com/index.html 2. unzip this and place it whenever you want 3. … Read more