Java

Scope and lifetime of variables in java

Let’s learn scope and lifetime of variables in java. Scope and lifetime of variables in java I have discussed scope of variables in java in…

Read More

Java switch case with multiple values

Let’s learn java switch case with multiple values. Java switch case with multiple values Let’s learn to check multiple values in single switch statement or…

Read More

Java switch with multiple cases

Let’s learn java switch with multiple cases. Java switch with multiple cases In the rearest case we need to perform on multiple cases in switch…

Read More

Java switch case with string

Let’s learn java switch case with string. Java switch case with string Since JDK 7 string literal was used in switch case. String in switch…

Read More

Use of java enum in switch case statement

Let’s learn the use of java enum in switch case statement. Use of java enum in switch case statement Enum types are special data type…

Read More

java sort string characters alphabetically

Let’s learn java sort string characters alphabetically. java sort string characters alphabetically Here we are going to sort string characters alphabetically using sort() method of…

Read More

Move a file from one directory to another using java

Let’s learn to move a file from one directory to another using java. Move a file from one directory to another using java In java…

Read More

java rename file extension

Let’s learn java rename file extension. java rename file extension Now let’s learn to rename file extension. Here’s the java program. import java.io.File; import java.io.IOException;…

Read More

java code to rename all files in a folder

Let’s learn java code to rename all files in a folder. java code to rename all files in a folder Here we are renaming files…

Read More

Delete a directory recursively in java 8

Let’s learn to delete a directory recursively in java 8. Delete a directory recursively in java 8 In the below example we are using Files.walk(path)…

Read More