• Floor division in Python
    10 April

    Floor division in Python

    In this post, we will see what is floor division in Python. There are numerous types of operators in Python, all of which have different functioning and are used in different scenarios. One such operator provided in Python is the floor division operator, which comes under the subcategory of Arithmetic Operators. This tutorial discusses what […]

  • How to unpack dictionary in Python
    22 March

    How to Unpack Dictionary in Python

    1. Introduction In Python, unpacking a dictionary is a technique that greatly enhances both the readability and efficiency of our code. This process involves extracting key-value pairs from a dictionary for use in various scenarios, such as passing arguments to functions, iterating through items, or forming new dictionaries. We will explore various methods for accomplishing […]

  • How to wait for 1 second in Python
    22 March

    Wait for 1 second in Python

    There are often times when there is a need to manually add delays or waiting time to a program in Python. This is one of the techniques to provide an overall better programming experience. This tutorial focuses on demonstrating the different ways available to learn how to wait for 1 second in Python. How to […]

  • Check if array is empty in Java
    04 March

    Check if Array Is Empty in Java

    In this post, we will see how to check if array is empty in Java. The arrays are a data structure that facilitates storing multiple instances of data together in contiguous memory locations. This article discusses different cases when an array is considered to be empty in Java. It also discusses methods to check, for […]

  • Format Date to YYYYMMDD in Python
    03 March

    Format Date to YYYYMMDD in Python

    1. Introduction to the Problem Statement Formatting dates into specific string representations is a crucial task in Python, especially in areas like data processing and reporting. One common format is “YYYYMMDD,” which is often used for its simplicity and ease of sorting. For instance, given a Python datetime object representing a date, say 2021-11-27, and we […]

  • java.lang.ClassCastException: java.util.Arrays$ArrayList cannot be cast to java.util.ArrayList
    22 February

    [Fixed] java.lang.ClassCastException: java.util.Arrays$ArrayList cannot be cast to java.util.ArrayList

    In this post, we will see how to fix java.lang.ClassCastException: java.util.Arrays$ArrayList cannot be cast to java.util.ArrayList. ClassCastException is runtime exception which indicate that code has tried to cast an object to a subclass which is not an instance. Reason for java.lang.ClassCastException: java.util.Arrays$ArrayList cannot be cast to java.util.ArrayList Although static method Arrays.asList() returns List, it returns […]

  • HashMap values cannot be cast to list
    21 February

    [Fixed] java.util.HashMap$Values cannot be cast to class java.util.List

    In this post, we will see how to fix error java.util.HashMap$Values cannot be cast to class java.util.List. Why HashMap values cannot be cast to list? HashMap values returns java.util.Collection and you can not cast Collection to List or ArrayList. It will throw ClassCastException in this scenario. Let’s understand with the help of example: [crayon-678c6d186143d637800707/] Output: […]

  • Format number with Commas in Java
    20 February

    Format Number with Commas in Java

    In this post, we will see how to format number with commas in java. How To Add Commas to Number in Java There are multiple ways to format number with commas in java. Let’s go through them. 1. Using DecimalFormat DecimalFormat can be used by providing formatting Pattern to format number with commas in java. […]

  • Unable to obtain LocalDateTime from TemporalAccessor
    20 February

    [Fixed] Unable to obtain LocalDateTime from TemporalAccessor

    In this article, we will see how to fix Unable to obtain LocalDateTime from TemporalAccessor in Java 8. Unable to obtain LocalDateTime from TemporalAccessor : Reason You will generally get this error, when you try to convert String to LocalDateTime and Formatted String does not have time related information. Let’s understand with the help of […]