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 in 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…

To Read Properties File in Java, the Properties Class has a Convenient load Method. That’s the Easiest Way to Read a Java Properties File. Properties are Configuration Values Managed as key/value Pairs. In Each Pair, the key and value are…

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…