|
|
|
General
|
Java get File Type
This section illustrates you how to get the file type. In the given example, we have create an instance of the class File and passed the file 'Hello.txt' to the constructor of this class.
View Rating |
|
|
General
|
Java get Absolute Path
In this section, you will study how to obtain the absolute path of a particular file. For this, we have define a file 'MainClass.java'. The method file.getAbsolutePath() returns the absolute path of the given file.
View Rating |
|
|
General
|
Java get Int from String
In this section, you will study how to obtain the integer value from String. For this, we have defined a string. The method Integer.parseInt(st) converts the string into the integer.
View Rating |
|
|
General
|
Input From Console
The Console Class inherits from Java.io.console and implements flushable interface. The Input from Console is used to access the character -based console device associated with the current Java virtual machine.
View Rating |
|
|