Author: misamaliraza94

  • Byte Array Input Stream Class

    In this tutorial, we will learn about Java ByteArrayInputStream and its methods with the help of examples. The ByteArrayInputStream class of the java.io package can be used to read an array of input data (in bytes). It extends the InputStream abstract class. Note: In ByteArrayInputStream, the input stream is created using the array of bytes. It includes an internal array to store…

  • File Output Stream Class

    In this tutorial, we will learn about Java FileOutputStream and its methods with the help of examples. The FileOutputStream class of the java.io package can be used to write data (in bytes) to the files. It extends the OutputStream abstract class. Before you learn about FileOutputStream, make sure to know about Java Files. Create a FileOutputStream In order to create a file output…

  • File Input Stream Class

    In this tutorial, we will learn about Java FileInputStream and its methods with the help of examples. The FileInputStream class of the java.io package can be used to read data (in bytes) from files. It extends the InputStream abstract class. Before we learn about FileInputStream, make sure to know about Java Files. Create a FileInputStream In order to create a file input stream,…

  • Output Stream Class

    In this tutorial, we will learn about the Java OutputStream and its methods with the help of an example. The OutputStream class of the java.io package is an abstract superclass that represents an output stream of bytes. Since OutputStream is an abstract class, it is not useful by itself. However, its subclasses can be used to write data. Subclasses of OutputStream…

  • Input Stream Class

    In this tutorial, we will learn about the Java InputStream class and its methods with the help of an example. The InputStream class of the java.io package is an abstract superclass that represents an input stream of bytes. Since InputStream is an abstract class, it is not useful by itself. However, its subclasses can be used to read data. Subclasses of…

  • Java I/O Streams

    In this tutorial, we will learn about Java input/output streams and their types. In Java, streams are the sequence of data that are read from the source and written to the destination. An input stream is used to read data from the source. And, an output stream is used to write data to the destination. For example, in our…

  • Java Enum Set

    In this tutorial, we will learn about the Java LinkedHashSet class and its methods with the help of examples. The LinkedHashSet class of the Java collections framework provides functionalities of both the hashtable and the linked list data structure. It implements the Set interface. Elements of LinkedHashSet are stored in hash tables similar to HashSet. However, linked hash sets maintain a…

  • Hash Set Class

    In this tutorial, we will learn about the Java HashSet class. We will learn about different hash set methods and operations with the help of examples. The HashSet class of the Java Collections framework provides the functionalities of the hash table data structure. It implements the Set interface. Creating a HashSet In order to create a hash set,…

  • Java Set Interface

    In this tutorial, we will learn about the Set interface in Java and its methods. The Set interface of the Java Collections framework provides the features of the mathematical set in Java. It extends the Collection interface. Unlike the List interface, sets cannot contain duplicate elements. Classes that implement Set Since Set is an interface, we cannot create objects from it. In order to use…

  • Linked Hash Map

    In this tutorial, we will learn about the Java LinkedHashMap class and its operations with the help of examples. The LinkedHashMap class of the Java collections framework provides the hash table and linked list implementation of the Map interface. The LinkedHashMap interface extends the HashMap class to store its entries in a hash table. It internally maintains a doubly-linked list among all…