How to compare two objects using "IF STATEMENT " in Linked list? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

How to compare two objects using "IF STATEMENT " in Linked list?

12th Jan 2017, 8:54 PM
Abdullah Alhmzani
Abdullah Alhmzani - avatar
2 ответов
+ 1
if you have two of your own object's you could write an boolean function equal which compares all attributes with each other. Then you can easily compare them in the linkedList by using this function
12th Jan 2017, 9:22 PM
Andreas K
Andreas K - avatar
0
INTERFACE ICOMPARABLE or redefine operator ">,<,=="
12th Jan 2017, 9:23 PM
Lazar