Erasken Ambassador Program

The team of Erasken has worked hard since 2019 to develop the most reliable crypto-assets marketplace in USA, where cryptocurrencies and tokens are traded securely among institutional and individual…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Java important differences everyone must know

Below are the main differences everyone must know. Based on my prior experience, this gets asked most of the time in interviews, irrespective of the number of years.

equals() vs ==

It is a java keyword used as a non-access modifier with Classes, attributes and methods.

After making class as final will not allow us to inherit the class.

Method as final will not allow us override in child class.

Making any variable as final will not allow us to override the value.

Finally block is used to execute for closing an open connections.

Note:

Every time an object is garbage collected, the finalize() method is called.

We can request the garbage collector to run using the System.gc() method.

List: List allows duplicate values. List allows multiple null values. List maintain insertion order.

Set: Set doesn't allow duplicate value. Set allows only one null value. It doesn’t maintain any insertion order. Set elements can be iterate using keyset() and entryset()

Map: Map allows only one null key and multiple null values. Map maintain insertion order. Map element need to convert into set to iterate.

I hope you found out this article interesting and informative. Please share it with your friends to spread the knowledge.

You can follow me for upcoming blogs follow.
Thank you!

Add a comment

Related posts:

Cuatro plataformas para crear tu newsletter

Este contenido fue publicado originalmente en MARKET, la newsletter para creadores de contenido y emprendedores que aprenden haciendo. Suscríbete aquí. Se subestima (mucho) el poder que tienen las…

Little Unknown

I am known to this world, I know what I am doing to being myself, To stand tall to this world. I know who am I am. Do i really know? I am working for myself daily, Thinking I seen this world…

Street Yeti

Exceedingly rarer than Bigfoot but just as deadly, the Street Yeti has only been photographed once, seen here just before it was struck by a Rolls Royce being driven by a drunken Wall Street…