What is an I/O filter?-

An I/O filter is an object that reads from one stream and writes to another, usually altering the data in some way as it is passed from one stream to another. In Core Java, an I/O filter refers to an object that reads from one stream and writes to another, effectively filtering the data as … Read more

What is the difference between Reader/Writer and InputStream/Output Stream?-

The Reader/Writer class is character-oriented and the InputStream/OutputStream class is byte-oriented. In Java, Reader and Writer are used for character-based input and output, whereas InputStream and OutputStream are used for byte-based input and output. Reader and Writer: Character-oriented: Reader and Writer are designed for reading and writing characters. Encoding: They deal with character encoding and … Read more

What is a stream and what are the types of Streams and classes of the Streams

A Stream is an abstraction that either produces or consumes information. There are two types of Streams and they are: Byte Streams: Provide a convenient means for handling input and output of bytes. Character Streams: Provide a convenient means for handling input & output of characters. Byte Streams classes: Are defined by using two abstract … Read more

What is the difference between set and list?

Set stores elements in an unordered way but does not contain duplicate elements, whereas list stores elements in an ordered way but may contain duplicate elements. In Core Java, a set and a list are both interfaces in the Java Collections Framework, and they represent different types of collections with distinct characteristics. List: Ordering: Lists … Read more

What are Vector, Hashtable, LinkedList and Enumeration

Vector : The Vector class provides the capability to implement a growable array of objects. Hashtable : The Hashtable class implements a Hashtable data structure. A Hashtable indexes and stores objects in a dictionary using hash codes as the object’s keys. Hash codes are integer values that identify objects. LinkedList: Removing or inserting elements in … Read more