Tag: java11
-
How to read and write to files easily with java.nio.file package
Prior to Java 7 reading and writing to files in Java was not intuitive. We had to depend on java.io package. To write to a file you had to use a file writer like this : You had to create a new instance of FileWriter and then also make sure it is closed once the…
-
HTTP Client – Java 11 – Making HTTP requests in Java is so easy now
Until Java 11 , making HTTP requests was not intuitive . You had to use the non friendly URLConnection class. With Java 11 , it looks easier and cool. To make any HTTP request ,you need the following: A HTTP Request A HTTP response A HTTP client to send the request and get the response…