- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Maruthi Krishna has Published 952 Articles
Maruthi Krishna
2K+ Views
The class named File of the java.io package represents a file or directory (path names) in the system. This class provides various methods to perform various operations on files/directories.To get the list of all the existing files in a directory this class provides five different methods to get the details of ... Read More
Maruthi Krishna
3K+ Views
The java.io package provides various classes to read write data from various sources and destinations.You can read data from user (keyboard) using various classes such as, Scanner, BufferedReader, InputStreamReader, Console etc.Using Scanner classFrom Java 1.5 Scanner class was introduced. This class accepts a File, InputStream, Path and, String objects, reads ... Read More
Maruthi Krishna
6K+ Views
In general, whenever you create a file you can restrict/permit certain users from reading/writing/executing a file.In Java files (their abstract paths) are represented by the Files class of the java.io package. This class provides various methods to perform various operations on files such as read, write, delete, rename etc.In addition, ... Read More
Maruthi Krishna
1K+ Views
The File classThe class named File of the java.io package represents a file or directory (path names) in the system. This class provides various methods to perform various operations on files/directories.This class provides various methods to manipulate files, The renameTo() method of the File class accepts a String representing a destination ... Read More
Maruthi Krishna
12K+ Views
From Java 1.5 Scanner class was introduced. This class accepts a File, InputStream, Path and, String objects, reads all the primitive data types and Strings (from the given source) token by token using regular expressions. By default, whitespace is considered as the delimiter (to break the data into tokens).To read ... Read More
Maruthi Krishna
321 Views
Until Java 1.5 to read data from the user programmers used to depend on the character stream classes and byte stream classes.From Java 1.5 Scanner class was introduced. This class accepts a File, InputStream, Path and, String objects, reads all the primitive data types and Strings (from the given source) ... Read More
Maruthi Krishna
458 Views
Java provides I/O Streams to read and write data where, a Stream represents an input source or an output destination which could be a file, i/o devise, other program etc.Based on the data they handle there are two types of streams −Byte StreamsThese handle data in bytes (8 bits) i.e., ... Read More
Maruthi Krishna
5K+ Views
The class named File of the java.io package represents a file or directory (path names) in the system. This class provides various methods to perform various operations on files/directories.Creating a new directoryThe mkdir() method of this class creates a directory with the path represented by the current object.Therefore, to create ... Read More
Maruthi Krishna
3K+ Views
The FileInputStream class reads the data from a specific file (byte by byte). It is usually used to read the contents of a file with raw bytes, such as images.To read the contents of a file using this class −First of all, you need to instantiate this class by passing ... Read More
Maruthi Krishna
12K+ Views
Java provides I/O Streams to read and write data where, a Stream represents an input source or an output destination which could be a file, i/o devise, other program etc.There are two types of streams available −InputStream − This is used to read (sequential) data from a source.OutputStream − This ... Read More