Java Get Free Space
In this section, you will study how to obtain available free space in the specified file. In the given example, we have provided the path of file 'Hello.txt' to the constructor of class File.
Java get File List
In this section, you will study how to retrieve all the files and folders from the specified directory. In the given example, we are providing the directory 'C:\\" to the constructor of class File.
Creating Menu Using Canvas Class
This example shows how to create the menu and call the canvas class to show the toggle message. The Toggle message will appear when user perform some action like click on a button ("Show").
In this example given below, we will learn how to read character from keyboard and display on standard output device. Method System.in.read() read character from keyboard and returns integer value of the character so we need to change type to char.