Two ways compare Java Double

This sample shows two ways compare Java Double object with another Double object or two dobule primitive values using methods of java.lang.Double class

Output First number is greater Value c1 = 1 Second number is greater Value c2 = -1

How to loop collection using Iterator object?

I show you three ways to loop collection using Iterator object. Hope you like and choose one to implement for your code. Although there are other ways to do but i recommend these ways for you. Iterate via “iterator loop” The hasNext() method returns true if the iteration has more elements. The next() method returns … Read more

Please share it if you found this useful
Hide Buttons