• 08 June

    Java enum with String

    In this quick tutorial, how to create String constants using enum, convert String to enum etc. You can go though complete enum tutorial here. Let’s create java enum String constants. Create java enum String [crayon-6742a1e0e83f9458573212/] That’s pretty simple. Access enum by name You can simply use . operator to access enum but if you have […]

  • 24 May

    Collections in java

    In this tutorial, we will see  about Collections in java. Collection framework is core part of java programming language. It is used in almost all the applications. Collections framework provides a way to store and retrieve the collection of elements. This framework has many interfaces and classes which makes programmer life easy. Let’s go through […]

  • Java 8 Tutorial
    20 May

    Java 8 tutorial

    In this post, we will see about Java 8 tutorial. I have written a lot of tutorials on Java 8. This is index post for all Java 8 posts. Java 8 has lots of new features which will change the way you do programming. Here is a list of features you need to know to […]

  • Java 8 Optional
    19 May

    Java 8 Optional

    In this post, we will see about Java 8 optional. Did you ever get NullPointerException as Java developer? If you are experienced Java developer, you might have got NullPointerException at some point of time. You might agree that NullPointerException is pain for novice or expert core Java developer. You have to put a lot of […]

  • 25 April

    Strategy design pattern in java

    In this post, we will see about Strategy design pattern in java. Strategy design pattern allows us to change algorithm implementation at runtime.Strategy design pattern provides multiple algorithms and client can choose algorithm based on their needs with the help of composition. Strategy design pattern example Let’s understand this with the help of simple example. […]

  • 24 April

    Singleton design pattern in java

    In this post, we will see about Singleton design pattern in java. Singleton design pattern is one of the simplest design pattern but singleton property can be broken using multithreading, reflection, serialization etc, so you need to be careful while you create the singleton class. Singleton design pattern restricts a class to create multiple objects […]

  • 22 January

    Matrix multiplication in java

    In this post, we will see how to multiply two matrices in java. [crayon-6742a1e0e9cb5197355852/] Output: Enter number of rows and columns of first matrix : 2 2 Enter first matrix elements : 2 4 6 8 Enter number of rows and columns of second matrix :2 2 Enter second matrix elements : 3 6 9 […]

  • 22 January

    Java program to add two matrices

    In this post, we will see how to add two matrices in java.I am giving example for 33 matrix. You can extend it to nn matrices. [crayon-6742a1e0e9d99529694851/] Output: Enter matrix 1 elements : 11 22 33 44 55 66 77 88 99 Enter matrix 2 elements : 10 20 30 40 50 60 70 80 […]

  • 22 January

    Java program to subtract two matrices

    In this post, we will see how to subtract two matrices in java.I am giving example for 33 matrix. You can extend it to nn matrices. [crayon-6742a1e0e9e5d280810406/] Output: Enter Matrix 1 Elements : 11 22 33 44 55 66 77 88 99 Enter Matrix 2 Elements : 10 20 30 40 50 60 70 80 […]