Everything Java , Spring , Back End , System Design
First We see a Simple Singleton Class Here :
Here we will try to figure out a way to generate unique random number within a upper limit .
First we will create two methods , one to print odd numbers and one to print even numbers till we reach the last number .
System — Concrete Class
Lets see this through a very interesting example :-
As a Java Developer we always come Across these two Interfaces when we need to sort any custom Object ,
Often we think why java has the hashcode method associated with it in the Object Class , where do we use it as developers and why we need…
In Java equals() method is used to compare equality of two Objects. The equality can be compared in two ways: