Mindblown: a blog about philosophy.

  • Priority Queue

    In this tutorial, we will learn about the PriorityQueue class of the Java collections framework with the help of examples. The PriorityQueue class provides the functionality of the heap data structure. It implements the Queue interface. Unlike normal queues, priority queue elements are retrieved in sorted order. Suppose, we want to retrieve elements in the ascending order. In this…

  • Queue Interface

    In this tutorial, we will learn about the Java Queue interface and its methods. The Queue interface of the Java collections framework provides the functionality of the queue data structure. It extends the Collection interface. Classes that Implement Queue Since the Queue is an interface, we cannot provide the direct implementation of it. In order to use the functionalities of Queue, we…

  • Stack Class

    In this tutorial, we will learn about the Java Stack class and its methods with the help of examples. The Java collections framework has a class named Stack that provides the functionality of the stack data structure. The Stack class extends the Vector class. Stack Implementation In stack, elements are stored and accessed in Last In First Out manner. That is, elements are…

  • Java Vector

    In this tutorial, we will learn about the Vector class and how to use it. We will also learn how it is different from the ArrayList class, and why we should use array lists instead. The Vector class is an implementation of the List interface that allows us to create resizable-arrays similar to the ArrayList class. Java Vector vs. ArrayList In…

  •  ArrayList Class

    In this tutorial, we will learn about the ArrayList class in Java. We will learn about different operations and methods of the arraylist with the help of examples. The ArrayList class of the Java collections framework provides the functionality of resizable-arrays. It implements the List interface. Java ArrayList Vs Array In Java, we need to declare the size of an…

  • Java List

    In this tutorial, we will learn about the List interface in Java and its methods. In Java, the List interface is an ordered collection that allows us to store and access elements sequentially. It extends the Collection interface. Classes that Implement List Since List is an interface, we cannot create objects from it. In order to use functionalities of the List interface, we…

  • Collection Interface

    In this tutorial, we will learn about the Java Collection interface and its subinterfaces. The Collection interface is the root interface of the Java collections framework. There is no direct implementation of this interface. However, it is implemented through its subinterfaces like List, Set, and Queue. For example, the ArrayList class implements the List interface which is a subinterface of the Collection Interface. Subinterfaces of Collection…

  • Collections Framework

    In this tutorial, we will learn about different interfaces of the Java collections framework. The Java collections framework provides a set of interfaces and classes to implement various data structures and algorithms. For example, the LinkedList class of the collections framework provides the implementation of the doubly-linked list data structure. Interfaces of Collections FrameWork The Java collections framework provides…

  • Throw and throws

    In this tutorial, we will learn to use throw and throws keyword for exception handling with the help of examples. In Java, exceptions can be categorized into two types: Unchecked Exceptions: They are not checked at compile-time but at run-time.For example: ArithmeticException, NullPointerException, ArrayIndexOutOfBoundsException, exceptions under Error class, etc. Checked Exceptions: They are checked at compile-time. For example, IOException, InterruptedException, etc. Refer to Java Exceptions to…

  • Try…catch

    In this tutorial, we will learn about the try catch statement in Java with the help of examples. The try…catch block in Java is used to handle exceptions and prevents the abnormal termination of the program. Here’s the syntax of a try…catch block in Java. The try block includes the code that might generate an exception. The catch block includes the code that…

Got any book recommendations?