Skip to content

Tag Archives: Java-I/O

FileInputStream class extracts input bytes from a file in a file system. FileInputStream is meant for reading streams of raw bytes such as image data.… Read More
While doing problems in various coding platforms in some questions we end up with (TLE). At that point of time even if we use fast… Read More
FileOutputStream is an outputstream for writing data/streams of raw bytes to file or storing data to file. FileOutputStream is a subclass of OutputStream. To write… Read More
The Serializable interface is present in package. It is a marker interface. A Marker Interface does not have any methods and fields. Thus classes… Read More
print(): print() method in Java is used to display a text on the console. This text is passed as the parameter to this method in… Read More
The given task is to take an integer as input from the user and print that integer in Java language.    In below program, the… Read More
The radix() method of java.util.Scanner class returns this scanner’s default radix. Syntax: public int radix() Return Value: This function returns the default radix of this… Read More
The reset() method of java.util.Scanner class resets this scanner. On resetting a scanner, it discards all of its explicit state information which may have been… Read More
skip(Pattern pattern) The skip(Pattern pattern) method of java.util.Scanner class skips input that matches the specified pattern, ignoring the delimiters. The function skips the input if… Read More
The nextShort(radix) method of java.util.Scanner class scans the next token of the input as a short. If the translation is successful, the scanner advances past… Read More
findInLine(Pattern pattern) The findInLine(Pattern pattern) method of java.util.Scanner class tries to find the next occurrence of the specified pattern ignoring delimiters. If the pattern is… Read More
The delimiter() method ofjava.util.Scanner class returns the Pattern this Scanner is currently using to match delimiters. Syntax: public Pattern delimiter() Return Value: The function returns… Read More
The close() method ofjava.util.Scanner class closes the scanner which has been opened. If the scanner is already closed then on calling this method, it will… Read More
The useRadix(radix) method of java.util.Scanner class sets this scanner’s default radix to the specified radix. A scanner’s radix affects elements of its default number matching… Read More
The lineSeparator() is a built-in method in Java which returns the system-dependent line separator string. It always returns the same value – the initial value… Read More