• 21 December

    Convert System.nanoTime to Seconds in Java

    1. Introduction In this article, we will look into How to Convert System.nanoTime() to Seconds in Java. We will look at different solutions to this problem in detail with working examples. Let us first have a quick look into the System.nanoTime() method in Java. 2. System.nanoTime() Method The System.nanoTime() method is a static method of […]

  • 06 December

    Update Value of Key in HashMap in Java

    In this article, we will look at How to Update the Value of a Key in HashMap in Java. We will look at different solutions to this problem in detail with working examples. It is recommended to learn about the concept of collections particularly HashMaps in Java and their working for a seamless understanding. Now, […]

  • 29 November

    Create Array of Linked Lists in Java

    Introduction In this article, we will look at how to Create an Array of Linked Lists in Java. We will look at ways to create an Array of Linked Lists or a List of Linked Lists in detail with working examples. Let us first have a quick peek into the concept of Linked Lists in […]

  • 26 November

    Check if Date Is Between Two Dates in Java

    Introduction In this article, we will discuss and dwell on how to compare dates in Java. The problem statement is : Check if a Date is between two dates in Java. This roughly translates to Given a date, we need to check if it lies between the range of two dates. Let us understand this […]

  • 28 October

    Convert UUID to String in Java

    Introduction In this article, we will have a look on How to Convert UUID to String in Java. We will also shed some light on the concept of UUID, its use, and its corresponding representation in Java class. Let us have a quick look at UUID. UUID: UUID stands for Universally Unique Identifier which identifies […]

  • 25 October

    Create Array from 1 to n in Java

    Introduction In this article, we will look at How to Create an Array from 1 to n in Java. We need to Initialize Arrays in a sequence of values ranging from 1 to number N. Knowing how we can initialize arrays in different ways will give us deeper insights into Array in Java and allow […]

  • 27 September

    Repeat String N times in Java

    Introduction In this article, we will learn how to Repeat a given String N times in Java . This is a trick question common in JAVA interviews and the candidate’s evaluation is based on different approaches he/she provides for the problem. So we will take a deep dive into looking at various ways to solve […]

  • 19 September

    How to Print 2D Array in Java

    Introduction In this article, we get a look on How to print a 2D or Two Dimensional array in java. Arrays are one of the most useful data structures when it comes to data storage. Arrays provide random access to the elements via their index basing which makes both accessing and storing the most efficient. […]

  • 19 September

    Return Empty Array in Java

    TL;DR To return empty Array in Java, you can use curly braces. [crayon-662c6f47822b9537090752/] or [crayon-662c6f47822c0680622825/] 1. Introduction In this article, we will take a look on to How to return Empty array in java. We will look at different ways to achieve this with demonstrated working examples in detail. At first, let us have a […]