How to Get Current Date and Current Time

If you are working on Java 8, it is recommended to use java.time package. If you are using prior to Java 8, it is often recommended to go for Joda API. In this post, we will discuss on how to get current date and current time using java.time package. To obtain current date from system … Read more

How to convert char array to String

String(char[]) String class accepts char array in its constructor and converts it into string. Output String.valueOf(char[]) String class provides valueOf method which accepts char array and returns a String object. StringBuilder.append(char[]) StringBuilder class provides an append method that can accept a char array. This method reads all characters and appends them to the buffer. We … Read more