Java basics - Working with Files
January 5, 2020
Joe
A Path is a sequence of directory names, optionally followed by a file name. A Path could be relative or absolute. A Path that starts with a root (/ or C:\) component is absolute; otherwise, it's relative. A relative path needs to be combined with another path in order to access a file.
Path absolute = Paths.get("/", "home","hello");
Path relative = Paths.get("myApp", "config","app.properties");
Comparing Java Arrays using equals and deepEquals
March 9, 2019
Joe
Arrays can be compared using the java.util.Arrays.equals(….)
and java.util.Arrays .deepEquals(a1,a2)
method. Let's see how these methods differs from another with an example.
Counting Duplicate Words and Characters in Java
January 8, 2017
Joe
Given the sentence “Simple problem but tricky problem”, count duplicate words and Characters. Let’s look at some of the ways we could solve this using Java.