Eclipse and STS (Spring Tool Suite) IDEs have the same shortcuts. STS is written on top of the Eclipse. So Eclipse shortcuts can be used in STS as well. Following are some important eclipse and sts ide shortcuts that every developer should know. Fomat Code : Ctrl + Shift + F Select the whole program
Java
Java File createDirectory() vs createDirectories() methods difference
Java createDirectory() and createDirectories() methods are present in NIO (New I/O) Files package. Let’s discuss the difference between createDirectory and createDirectories method in this post. Both createDirectory and createDirectories methods return’s the file Path createDirectory createDirectory method creates only a single folder. For example, if you want to create folder2 and if parent exists (i.e.,
How to Check a file exist or not in Java
This post guides you to check a file exist or not in the Java programming language. The Java File API has a method exists() that returns a boolean value. Syntax This tests whether the file or directory denoted by the abstract filename exists or not. This method does not take any parameter as input. The
Java File mkdir() vs mkdirs() methods difference
In this post we will discuss the difference between File APIs two methods mkdir() and mkdirs(). mkdir() vs mkdirs() mkdir() method will create folder only if the immediate parent folder is missing. If any of the parent the folder is missing the mkdir() method will return false. mkdirs() method will create all the folders if
Java Get Files with Particular Extension
Sometimes we might need files with a particular extension. We will see how to get a file with a particular extension in Java 8. Say there are various files extensions like .pdf, .doc, .txt, etc. Suppose we need files only in .txt extension we will use Java NIO Path API to get files ending with