Quick Coding Tips in Java

Quick tips and solutions for common coding queries in Java.

How to get file attributes or permissions using Java NIO with examples

How to check for existence of a file in Java

How to count number of files in a directory in Java | File.list() vs NIO’s DirectoryStream

Java 8 – How to use range(), rangeClosed() methods of IntStream, LongStream with examples

Java 8 – How to get Day of Week, Month in Spanish, French for any date using Locale

How to get IP Address and Hostname in Java using InetAddress with example

Java 8 – How to get last day / last working day of a month as LocalDate

How to convert java.util.TimeZone to java.time.ZoneId in Java 8 | tutorial with examples

Java 8 – How to convert java.util.Date to java.time.LocalDate, java.time.LocalDateTime with examples

Java 8 – How to convert String to LocalDate and LocalDate to String in specific format

Java 8 – How to count words in a text file in Java using NIO and Streams API

How to perform elementary Date-Time calculations in Java 8

Java – How to recursively list all files and subdirectories in a directory with examples

How to copy or move a file in Java from one location to another with examples

How to Print array in Java using Arrays.toString, Arrays.deepToString, Arrays.stream methods

How to get user’s current working directory or Java Execution Path

java 8 – how to calculate difference between two dates or java.time.LocalDate instances

Java 8 – How to get current timestamp using java.time.Instant