To force delete file using Java, we can use the FileUtils or FileDeleteStrategy class available in Apache Commons Io demo to force delete file using java

output:-

We can also use FileDeleteStrategy class of apache commons io to…

Delete file using java with the help of delete method available in java.io.File package. The File.delete() method return boolean value. if the file is deleted successfully then the delete() method return true, on the other hand if it not able…

In this post we will see that how to get current date and time in java using the class java.util.Date and java.text.SimpleDateFormat. Below is the code to get current date and time in java using Date class :-

output:-…

We can Easily Detect Duplicates using Set. In this tutorial we will create a program whose functionality will be to detect duplicates using set in the given input. in the program we are using Set because set does not contain…

Below code will print the asterisk pyramid upto 5 level

in the above program we are initializing three loops, our basic requirement is to print the pyramid up to 5 label, so first loop will run up to 5,…