• 07 February

    Get number of days in Month in java

    Learn about how to get number of days in Month in java. Get number of days in Month in java Using YearMonth’s lengthOfMonth() [Java 8] You can use YearMonth‘s lengthOfMonth() method to get number of days in Month in java. Pass Year and month to YearMonth’s of and create YearMonth object. Call lengthOfMonth() on YearMonth’s […]

  • Get last day of month in java
    04 February

    Get last day of Month in java

    Learn about how to get last day of month in java. There are times when you need to get last day of month to process data at the end of each month. For example: Processing salaries of the employee in your company. There are multiple ways to get last day of month in java Ways […]

  • Find character in String in java
    02 February

    Find Character in String in Java

    In this post, we will see how to find character in String in java. How to Find Character in String in Java There are multiple ways to find char in String in java 1. Using indexOf() Method to Find Character in String in Java indexOf() method is used to find index of substring present in […]

  • 02 February

    Remove Comma from String in Java

    Learn about how to remove comma from String in java. Remove comma from String in java 1. Using replace() method You can use String’s replace() method to remove commas from String in java. Here is syntax of replace method: [crayon-673f8d94340b5789651292/] [crayon-673f8d94340ba047416159/] Output: India China Bhutan 2. Using replaceAll() method You can also use replaceAll() method […]

  • How to print multiple variables in java
    31 January

    How to Print Multiple Variables in Java

    1. Introduction In Java programming, it’s common to need to print multiple variables for various purposes like debugging, logging, or displaying information to the user. These variables might be of different data types (such as integers, strings, or floats), and our goal is to effectively combine and display them. The expected output is a coherent […]

  • Java ArrayList of objects
    25 January

    Create ArrayList of Objects in Java

    In this tutorial, we will learn how to create ArrayList of objects in Java. We will create a Book class with different properties and use it to create custom book objects when creating an ArrayList of objects. We will filter these book objects using certain criteria and add the book objects that meet the criteria […]

  • Split String by pipe in java
    15 January

    Split String by pipe(|) in java

    In this post, we will see how to split String by pipe in java. How to split String by pipe in java There are multiple ways to split String by pipe (|) in Java. Using split() method You can use String’s split() method to split String by pipe in java. Let’s say you want to […]

  • Initialize empty array in java
    01 January

    Initialize Empty Array in Java

    💡 Outline You can use below code to initialize empty array in java. [crayon-673f8d94353fe062062745/] Or [crayon-673f8d9435403466949744/] Or [crayon-673f8d9435405125744532/] 1. Introduction In this post, we take a look on How to Initialize empty array in Java. We will look at different ways to Initialize arrays in Java with dummy values or with prompted user inputs. Arrays […]

  • Convert String to Array in java
    11 December

    Convert String to Array in Java

    When developing applications in Java there are many cases where we will find ourselves converting data from one type to the other. Developers must understand how this is done because it will enhance their system effectiveness leading to ease of use from different users interacting with the system. How to convert String to Array in […]