Custom Exception in Java can be created by Extending the Exception Class. By Creating Custom Exception in Java We can Provide Some Custom Information. Program to Create Custom Exception in Java:-

output:-

Bubble Sort in Java is a bubble sorting algorithm, in which elements of the list gradually rise or bubble to their proper location in the array. Bubble sort algorithms cycle through a list, analyzing pairs of elements from left to…

Get All Key Values from Properties File Get All Key Values from Properties File in java using the Properties class Available in java.util Package. The Properties class extends the Hashtable class. From Hashtable, Properties class inherits the Method KeySet() which…

We can get the list of IP addresses that are assigned to it using a network interface. Network interface addresses can be obtained from a NetworkInterface instance by using one of two methods. The first method, getInetAddresses(), returns an Enumeration…

MAC Address can be obtained using the NetworkInterface class. This class represents a Network Interface made up of a name, and a list of IP addresses assigned to this interface. It is used to identify the local interface on which…

To delete all files using java we can simply use the delete() method available in java.io.File package. First we have to list all the file in directory using the File.listFiles() method and then simply use the File.delete() method to delete…