How can you eliminate duplicates?

Answer Posted / deepak kumar sungh

Any Set. set always contains unique elements. However, you
must take care in case of objects where you need to define
the hashCode and equals method

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is java logo a cup of coffee?

614


Should database connections be singleton?

560


What’s the difference between callable and runnable?

537


What are user defined exceptions?

582


What is the difference between assignment and initialization?

546






Does java runtime require a license?

568


What are predefined functions?

559


What is get () in java?

556


What is http client in java?

513


What do you mean by stack?

627


What is the difference between state-based unit testing and interaction-based unit testing?

489


How do you insert a line break?

485


Is java same as core java?

578


How do you identify if jvm is 32-bit or 64-bit from java program?

531


What is 16 bits called?

490