Core Java With OCJP/SCJP: Collections Part-9 || comparator

  Рет қаралды 252,933

Durga Software Solutions

Durga Software Solutions

Күн бұрын

Пікірлер
@ishu8981
@ishu8981 8 жыл бұрын
I dont know your profit in this, but trust me through these videos u are helping millions of needy and poor freshers....
@sushma6314
@sushma6314 6 жыл бұрын
ishu singhal really ! I wish he prospers a lot !!
@shraddhajayaraman
@shraddhajayaraman 6 жыл бұрын
his videos give direction to lost freshers too.
@ranjeetbiet5061
@ranjeetbiet5061 3 жыл бұрын
Amazing sir ..way of teaching is excellent
@jaganmohanmylapuru5974
@jaganmohanmylapuru5974 5 жыл бұрын
many of your students and followers are now earning lakhs of rupees as packages and leading better life with their families . All the credit goes to you sir Thank you is a small word.
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Jagan. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@niftymiller6057
@niftymiller6057 6 жыл бұрын
Not sure how many patience to see this, i have around more than 10+ years experience. I found this to be extremely useful for me. Durga Sir, i cannot imagine how much effort you spent in educating students inclassroom and now i see on youtube. God Bless you and your good work should continue. I am sure many utilized your knowledge and gained in professional life. Kudos
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Nifty Miller. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@raviprabhat5794
@raviprabhat5794 4 күн бұрын
Respect to Durga Sir He makes us dreamer. Thank you so much sir
@SameerKumar-sy5zb
@SameerKumar-sy5zb 3 жыл бұрын
God level explanation.Crystal clear explanation.Just waiting for days when Durga sir will teach DSA in Java.
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Bhaskar. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@azureaqua2218
@azureaqua2218 3 жыл бұрын
Then every student of Durga sir will be placed in google , apple sort of product based companies ...Durga sir is a god of JAVA
@MultiDora30
@MultiDora30 7 жыл бұрын
Durga Sir , U are the best in java . Simple explanation even the complex text books failed to explain me. Thanks a lot for Helping us in this way. In the background, So many students are getting benefitted from these videos. I live in US , I have 6+ years of experience . Till date in my Career . I dint see anyone explained this clear and detail . Hands-off to you Durga Sir.
@lpavan09
@lpavan09 8 жыл бұрын
Simply Superb explanation Sir. The way you provide the examples and the way you turn the most confusing topics to very simple topics is extraordinary.
@md.ruhulamin7963
@md.ruhulamin7963 6 жыл бұрын
What an explanation sir!!! I never saw this type of teaching in my life. Durga sir is the best.
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Md. Ruhul Amin. Thanks for your valuable feedback.It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@ankitasaini2321
@ankitasaini2321 6 жыл бұрын
no body can explain collections better than you.....thank you sir....
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Helloankita, Thanks for your valuable feedback.It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/U1KKyi You an see more Java videos following link: Java tutorial by durga sir goo.gl/XWb4RL Java 9 by durga sir goo.gl/hXGyBW Java 1.8 Version New Features by Durga sir goo.gl/iHXXYU Adv Java JDBC Tutorial by Durga sir goo.gl/8q16Eo OCJA 1.8 Java SE 8 Programmer - I (1Z0 - 808 ) By Durga sir goo.gl/gC6R7f Core Java by NagoorBabu sir goo.gl/s6Nvj1 Advenced Java by Nagoorbabu sir goo.gl/ZZonzJ CoreJava by Ratan goo.gl/3VM19v Advanced Java jdbc by Ratan goo.gl/Rn2UXr Advjava tutorials - JSP by Ratan goo.gl/Z6ytxm Adv java servlets tutorial by ratan goo.gl/zTwi9y Servlet and JSP Tutorial by anji reddy goo.gl/jZMRUv Advanced Java Jdbc by Anjireddy goo.gl/16CGzX Hibernate byAnjireddy goo.gl/qQojvZ Struts by Anjireddy goo.gl/nE1Eof Spring by Mr.AnjiReddy goo.gl/NfN14R ADV JAVA by Naveen goo.gl/bhSsXF Spring by Mr.Naveen goo.gl/huVwFN Hibernate by Mr. Naveen goo.gl/TY3Wpd Struts by Mr.Naveen goo.gl/Vkmiw7
@pallavijadhav370
@pallavijadhav370 2 жыл бұрын
Durga sir is the heart ❤ of java . All video is very helpful for me to understand java concepts deeply. Thanks from hurtly sir..may God bless 🙌 you !!
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 2 жыл бұрын
Hello Pallavi. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@venkatnaresh548
@venkatnaresh548 5 жыл бұрын
Durga sir...u always rock, I know u from last 15 years, u r my gate trainer in vani institute
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Venkat. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@sonalgupta791
@sonalgupta791 3 жыл бұрын
God bleas you❤
@nagamaheshdulipalla4660
@nagamaheshdulipalla4660 6 жыл бұрын
Ur giving food to thousands of people
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Mahesh. Thanks for your valuable feedback.It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@javatraining3903
@javatraining3903 7 жыл бұрын
Great Explanation!! God bless you!! I will not forget these concepts in my lifetime
@vursha7033
@vursha7033 3 жыл бұрын
Sir u r extraordinary hats off.. Thanks a lotttt sir.....
@nilesh7345kaka
@nilesh7345kaka 2 жыл бұрын
Sir To good Your videos are really helping poor ones and poor techies
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 2 жыл бұрын
Hello Nilesh. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@prashumatoori8011
@prashumatoori8011 5 жыл бұрын
Hi Durga sir.. Thank you so much for your teaching Java. I am very interested to watch your vedios to learn Java. I am a big fan of you. Your way of explanation is awesome. Thank you sir
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Prashu Matoori. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@omkarpingale3019
@omkarpingale3019 3 жыл бұрын
The best explanation ever..ty durga sir
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Omkar. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@omkarpingale3019
@omkarpingale3019 3 жыл бұрын
@@DurgaSoftwareSolutions pls upload video for Optional class (JAVA 8)
@EngineerVaibhav
@EngineerVaibhav Жыл бұрын
The important thing that is compare () and compareTo() methods is very important for TreeSet class.
@shaikkhajapasha2405
@shaikkhajapasha2405 7 жыл бұрын
your teaching is awesome sir you are too good and explain ing method is also very very good
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 7 жыл бұрын
Hi Shaik. Thank you very much for your feedback
@nitinsuman3362
@nitinsuman3362 7 жыл бұрын
God of Java..Hatsoff to you sir..
@EngineerVaibhav
@EngineerVaibhav Жыл бұрын
144 video completed🎉❤
@shashanknaag4910
@shashanknaag4910 2 жыл бұрын
Perfectly explained
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 2 жыл бұрын
Hello Shashank. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@shreyaagarwal6746
@shreyaagarwal6746 4 жыл бұрын
I wish I had taken your tutorials earlier. So to the point and clear.
@rounakbajaj1273
@rounakbajaj1273 4 жыл бұрын
Exactly..same here..some things in this video is new for me..from what i have learnt before..if i know this earlier then it would be great ..directly to the point...
@sonnix31
@sonnix31 6 жыл бұрын
Excellent, best teacher ever. Thank you!
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Jackson. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@rohithk6878
@rohithk6878 7 жыл бұрын
this is good helpful videos to forgive so much doubt & concepts explaining to weak students is such aey fantastic
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 7 жыл бұрын
Hi Rohith. Thank you very much for your feedback
@rajeshjha9359
@rajeshjha9359 3 жыл бұрын
amazing explanation to become COLLECTION KING
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Rajesh. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@TipsForTechOfficial
@TipsForTechOfficial 5 жыл бұрын
Sir U Are really Great, i love your Pedagogy..
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Sahil Kumar. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@prashantmore8489
@prashantmore8489 3 жыл бұрын
If u have doubt in comparable and comparator watch this awesome video 👏
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Prashant. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@rockbrand753
@rockbrand753 4 жыл бұрын
Thank you so much Sir :) May God give you Happiness, Health, and Wealth. you are amazing personality :) Thank you thank you thank you sir :) :)
@poojagarg6979
@poojagarg6979 6 жыл бұрын
thanks a lot sir.... every tough concept become so easy and clear after learning from your tutorials.... /\ You are just amazing... hats off to you..... :-)
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Pooja. Thanks for your valuable feedback.It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/U1KKyi You an see more Java videos following link: Java tutorial by durga sir goo.gl/XWb4RL Java 9 by durga sir goo.gl/hXGyBW Java 1.8 Version New Features by Durga sir goo.gl/iHXXYU Adv Java JDBC Tutorial by Durga sir goo.gl/8q16Eo OCJA 1.8 Java SE 8 Programmer - I (1Z0 - 808 ) By Durga sir goo.gl/gC6R7f Core Java by NagoorBabu sir goo.gl/s6Nvj1 Advenced Java by Nagoorbabu sir goo.gl/ZZonzJ CoreJava by Ratan goo.gl/3VM19v Advanced Java jdbc by Ratan goo.gl/Rn2UXr Advjava tutorials - JSP by Ratan goo.gl/Z6ytxm Adv java servlets tutorial by ratan goo.gl/zTwi9y Servlet and JSP Tutorial by anji reddy goo.gl/jZMRUv Advanced Java Jdbc by Anjireddy goo.gl/16CGzX Hibernate byAnjireddy goo.gl/qQojvZ Struts by Anjireddy goo.gl/nE1Eof Spring by Mr.AnjiReddy goo.gl/NfN14R ADV JAVA by Naveen goo.gl/bhSsXF Spring by Mr.Naveen goo.gl/huVwFN Hibernate by Mr. Naveen goo.gl/TY3Wpd Struts by Mr.Naveen goo.gl/Vkmiw7
@balakrishna2571
@balakrishna2571 5 жыл бұрын
no one can teach like you sir
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Bala krishna. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@pawankumaryadav1947
@pawankumaryadav1947 6 жыл бұрын
your are great sir father of java in india
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Pawan. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@nareshshama1982
@nareshshama1982 4 жыл бұрын
sir, as you said we use comparable only for default natural sorting order, but we can do customized sorting too using comparable too. like public class Emp implements Comparable{ int empid; String empname; public Emp(int empid, String empname) { super(); this.empid = empid; this.empname = empname; } @Override public int compareTo(Emp e) { return empname.compareTo(e.empname); }
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Naresh. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@abhilashkokkonda1713
@abhilashkokkonda1713 5 жыл бұрын
Thank you very much sir. I owe millions of rupees to you.. U r a god of collections _/\_
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Abhilash. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@ranveervaghela7030
@ranveervaghela7030 2 ай бұрын
Completed watching on Oct 07, 2024 at 7.09 PM :) :)
@rizwanshahid1447
@rizwanshahid1447 7 жыл бұрын
Thanks so much, Durga Sir.
@muhammadahmadi7799
@muhammadahmadi7799 6 жыл бұрын
Sir you are the best!!!!!
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Ahmadi. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@kvbr522
@kvbr522 6 жыл бұрын
Thanks for uploading the videos ,really I am very understood for the videos,u r a.unic style in teaching field,my guess really Java means Durga sir
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Bhaskar. Thanks for your valuable feedback.It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@EngineerVaibhav
@EngineerVaibhav Жыл бұрын
Comparable interface and Comparator interface play big role in TreeSet concept.
@balasahebbande5495
@balasahebbande5495 5 жыл бұрын
greate teacher for java
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Balasaheb. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@mithunrocker
@mithunrocker 6 жыл бұрын
You are simply awesome!!!
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Mithun. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@saiyashwanth1991
@saiyashwanth1991 6 жыл бұрын
He is just telling how the language is working not insisting on what algorithms the methods use,for example comparator uses for Integer a combination of merge sort and Insertion sort called tim sort,why it is used and what's exactly this does.it should be focused because if one learn java it does'nt mean one can build google or microsoft one should learn basic algorithms behind the methods to understand language in a greater depth.
@ankitadixit5875
@ankitadixit5875 5 жыл бұрын
Hmmm..... So from where do learn implementation.. If u could help
@jvsnyc
@jvsnyc 4 жыл бұрын
Yeah, but a huge number of HackerRank or LeetCode problems that one is very likely to see in context of Interview process will be hugely helped by knowing this. It is formally part of the OCJP preparation anyway. It isn't really supposed to be a drop-in replacement for a full algorithms course.
@poojak1742
@poojak1742 7 жыл бұрын
you are super sir. excellent teaching
@rekyanayak3780
@rekyanayak3780 5 жыл бұрын
TreeSet not allow duplicate but, in TreeSetDemo3 we are adding 20 two times for both Comparable, Comparator Why don't we get Exception?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Rekya. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@mohanrammanikandan7939
@mohanrammanikandan7939 4 жыл бұрын
Hello, Rekya. Good Question. TreeSet will not allow duplicates based on comapreTo() or compare() methods return value. If those methods return 0, then duplicates will not be inserted. But in Durga sir's example TreeSetDemo3, the methods are overridden in a way to allow duplicates. Please re-check the video from 44:00 to get more insight. It will help you.
@jvsnyc
@jvsnyc 4 жыл бұрын
What we do here is but one example of what can happen if you ever return other than 0 from a Comparator being used for a TreeSet (or keys of a TreeMap) for values which would return true from .equals() -- this one is an obvious example we would never make a mistake like this in real life. But what if your Comparator ignored some data fields in your object that do get looked at in your .equals() method? Every Comparator used needs to respect the .equals() case of natural sorting order or these kind of things can happen. Nothing in Java magically protects us from running over our foot like this.
@utsavmodh9698
@utsavmodh9698 8 ай бұрын
I think java is not owned by Oracle but its owned by Durga sir 😅
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 8 ай бұрын
Hello Utsav. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@santhoshkoduri223
@santhoshkoduri223 8 жыл бұрын
i never listen this type of teaching in my life
@VikahKumar-g6s
@VikahKumar-g6s 4 ай бұрын
Thank you will be a small word as u are explaining the topics. Sir can allow all videos access of JDBC Please sir
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 ай бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@GyanMastiKiPathsala
@GyanMastiKiPathsala 7 жыл бұрын
Perfect Teaching
@surajsuryawanshi7835
@surajsuryawanshi7835 3 жыл бұрын
Sir as u said every collection takes object as input including treeset then why 37.00 programme not giving error as we are inserting directely integers insted of Integer objects
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Suraj. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@राजनगोंगल
@राजनगोंगल Жыл бұрын
👍👍👍👍👍👍
@jayantagarwal6339
@jayantagarwal6339 6 жыл бұрын
Thank you Sir🙏🏻🙏🏻
@yogeshsolunke4379
@yogeshsolunke4379 4 жыл бұрын
two methods are present in comparator interface compare and euqals then how it is functional interface?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Yogesh. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@jvsnyc
@jvsnyc 4 жыл бұрын
Abstract methods present in any interface that are identical to ones inherited from Object don't count towards that total. This is mentioned in his Java 8 courses and playlists, among many other places.
@prathibhasanku6871
@prathibhasanku6871 2 жыл бұрын
how do the compiler is going to know that 10 being the root node is there any backend process
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 2 жыл бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@VikahKumar-g6s
@VikahKumar-g6s 4 ай бұрын
Sir please upload all videos of JDBC
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 ай бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@chethanprabhu4475
@chethanprabhu4475 6 жыл бұрын
just a suggestion instead of giving if(i1i2) { return -1; } else return 0; Instead of all this just give 1 line return i2-i1; that's it.
@sonnix31
@sonnix31 6 жыл бұрын
You need to watch the whole lesson. That code you just wrote is not better than what he explains.
@chethanprabhu4475
@chethanprabhu4475 6 жыл бұрын
@@sonnix31 i said when you are working in an company. Because company expects you to write code with minimum time complexity.
@chethanprabhu4475
@chethanprabhu4475 6 жыл бұрын
@@sonnix31 that suggestion wasn't for sir :) it was for viewers. Hope you get that :)
@awraxzer
@awraxzer 5 жыл бұрын
@@chethanprabhu4475 It's a great suggestion, I like it.
@jvsnyc
@jvsnyc 4 жыл бұрын
@@chethanprabhu4475 There are dangers in the code you wrote as a substitution. Picture i1 is a very large negative number, and i2 is a decent sized positive number. Well, when you do i1 - i2 it will overflow and give a positive number. Positive number means i1 is > i2 which is NOT TRUE. 2. Picture i1 is a reasonable, decent sized negative number, and i2 is a VERY LARGE sized positive number. i1 - i2 will overflow and give a positive number, saying that i1 is > i2, but it is NOT! 3. Say that i1 is a decent sized positive number, and i2 is a very large negative number. i1 - i2 will overflow yielding a negative result, suggesting that i1 is > i2. But it is NOT. Say that i1 is quite a large sized positive number, and i2 is a decent sized negative number. i1 - i2 can overflow and get us a negative number, telling us that i1 is < i2. But, it IS NOT. For values like 2, 5, 12, 30, 7, 49, yes, you can take that shortcut and many books and tutorials show it. But it is not safe for all legal values of integers. You can sometimes get away with it because you know or hope you know the range of values that are ever going to be put into a particular TreeSet, etc. -- but what happens when you open your code up to others for use -- some of them quickly say your code is broken. Does i1 - i2 save so much time vs. (i1 < i2) ? -1 : (i2 < i1 ) ? : +1 : 0 that it is worth it?
@sonamprajapati2843
@sonamprajapati2843 4 жыл бұрын
In case no 7 ...why only first element will be inserted and all remainings are consider as duplicate...??
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Sonam. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@shivalayayadav7685
@shivalayayadav7685 4 жыл бұрын
Because at first there is no elements to compare so it accept it....To compare ,at least 2 elements are necessary so after getting 2nd element it is eligible to compare and as he wrote [return 0] so for every comparison we get 0 ...(duplicate)
@ibrahimshaikh3642
@ibrahimshaikh3642 7 жыл бұрын
nice explanation sir
@ritikpatel7918
@ritikpatel7918 3 жыл бұрын
sir why we go for comparator, why don't we override the comparable's compareTo method?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Ritik. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@-AjayChauhan
@-AjayChauhan 7 ай бұрын
Completed this video Day 64 of #75daysofcode in Java 19 May, 2024
@hasohasao851
@hasohasao851 4 жыл бұрын
@Durga sir, I understand the basics including d concepts also while u r teaching bt sir, how to remember all these syntaxes? I mean sir these r so difficult to remeber all steps... Can u tell whts d procedure plz??? And thank you sir for ur free teaching classes. Staying in India u r lyk real hero sir. 🙏
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Haso Hasao,. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@mohanrammanikandan7939
@mohanrammanikandan7939 4 жыл бұрын
Excellent, sir. This is called a real post-mortem. You indeed did a post-mortem on the compare() method.
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Manikandan. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@Pri_-
@Pri_- 5 жыл бұрын
Thank you So much Sir..:)..:)
@shahzaiblashari7250
@shahzaiblashari7250 6 жыл бұрын
just awesome
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Gamer Zone. Thanks for your valuable feedback.It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@Sadhana1729
@Sadhana1729 4 жыл бұрын
TreeSet we are having descendingSet() method for descending order right? TreeSet T1= new TreeSet(); T1.add(15); T1.add(20); T1.add(25); T1.add(30); T1.add(35); T1.add(40); System.out.println(T1); System.out.println(T1.descendingSet()); Output: [40, 35, 30, 25, 20, 15]
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Srujan. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@shrutigawade3265
@shrutigawade3265 4 жыл бұрын
Before execution of the descendingSet(), the compareTo() has executed and in ur example only the output of compareTo() has reversed not the total content..
@prathibhasanku6871
@prathibhasanku6871 2 жыл бұрын
Also,why this tree set implents only inorder traversal but not preorder traversal and post order traversal
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 2 жыл бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@sahilk335
@sahilk335 6 жыл бұрын
Thanks for the video. Watch at 1.25X Speed
@chethanprabhu4475
@chethanprabhu4475 6 жыл бұрын
Exactly wat i do😂
@philomath_u
@philomath_u 5 жыл бұрын
44:00 to 50:42
@vjsuslade2467
@vjsuslade2467 6 жыл бұрын
Thank you sir you are great..
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Suslade. Thanks for your valuable feedback.It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@paragladekar3174
@paragladekar3174 5 жыл бұрын
Sir u used int return type for int type of object then why don't you use string return type for string type of objects?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Parag ladekar. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@liferide2002
@liferide2002 6 жыл бұрын
Fantastic teacher. How can I support your channel ? do you accept donations
@Abhinav2091
@Abhinav2091 5 жыл бұрын
if I use2nd case that is return with -ve how duplicate will get recognized I mean it will return 0 but I am returning -ve with it so it will be -0?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Abhinav. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@swathiranimamidala
@swathiranimamidala 3 жыл бұрын
Can u provide hard copy notes fr reference purposes
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Swathirani. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@akshatakabeer7794
@akshatakabeer7794 8 жыл бұрын
nice..
@abhishekANAND-md1lq
@abhishekANAND-md1lq 4 жыл бұрын
Why don't we declare Comparator as an Abstract class instead of Interface as it has concrete equals() method?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Anand. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@VivekKumar-ol4wz
@VivekKumar-ol4wz 7 жыл бұрын
sir,i have one doubt..... Why it is comparing always to the root element first(10)????? why not the recently added element????
@sushma6314
@sushma6314 6 жыл бұрын
Vivek Kumar how would you know whether to go left or right of the root ? And once you know it say left and it has an element, again u have to check if you have to go left or right , so on..
@sagarsune2739
@sagarsune2739 7 жыл бұрын
Can we do customized sorting by Implementing comparable interface
@jvsnyc
@jvsnyc 4 жыл бұрын
Whatever you do in your class by implementing Comparable interface is by definition defining the natural sorting order for that class.
@poojagoyal8868
@poojagoyal8868 7 жыл бұрын
sir..I have on doubt.. duplicates are not allowed in Set then how we are getting duplicates on return +1 Nd return -1.
@poojagoyal8868
@poojagoyal8868 7 жыл бұрын
one*
@jvsnyc
@jvsnyc 4 жыл бұрын
This is simply why you should never use a Comparator that returns -1 or 1 for elements that would compare with true for .equals(), but to only return 0 for those. If you don't follow that, you break the Set contract.
@Lakshmankablog
@Lakshmankablog 2 жыл бұрын
🥳🐎🤩👏👌
@VikahKumar-g6s
@VikahKumar-g6s 4 ай бұрын
Sir please allow JDBC all videos
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 ай бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@RamaKrishna-ik4eo
@RamaKrishna-ik4eo 7 жыл бұрын
Hi ArrayList ar=new ArrayList(); ar.add(011); sop(ar); O/P: [9] can u please explain y o/p is 9 in above code ?
@ExceptionalPOV
@ExceptionalPOV 7 жыл бұрын
By defining any integer value with a '0' as prefix you actually specify a value in Octal system. Which is nothing but (0*16)+(1*8)+1=9.
@akhileshkumarbhagat9319
@akhileshkumarbhagat9319 7 жыл бұрын
Because 011 is the octal number, not a decimal number. The decimal number never starts with 0(zero). JVM internally converts 011(octal number) to decimal number. so result is 9.
@DeepakKumar-mj3xw
@DeepakKumar-mj3xw 8 жыл бұрын
Thanks sir you have provided all theses video. Please can you upload spring
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 8 жыл бұрын
Ya it is there Deepak... plz follow this link..
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 8 жыл бұрын
kzbin.info_all_playlists?sq=spring
@deepakp4526
@deepakp4526 7 жыл бұрын
I am getting no page found if I am trying to ope this link
@kharkharee
@kharkharee 4 жыл бұрын
The only drawback I see here is, it is very slow, but may be its good also for somebody
@anuragsmusic
@anuragsmusic 4 жыл бұрын
You can change the playback speed
@sqb8980
@sqb8980 3 жыл бұрын
I watch in 2x speed
@ammulupriyanka7289
@ammulupriyanka7289 7 жыл бұрын
i want durga sir chapter list of ocjp/scjp becasue i con't understand to start which cocept first
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 7 жыл бұрын
Hi Priyanka. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627
@revathikambham3629
@revathikambham3629 7 жыл бұрын
1. Language fundamentals 2.Declaration and access control 3. Operators and assignments 4. Flow control 5. Exception handling 6. Assertions 7. Garbage collections 8. OOPS 9. Multi-threading 10. java.lang.package 11. java.io.package 12. serialization 13. collection framework 14. generics 15. inner classes 16. internationalization 17. development 18. regular expressions 19. enum 20. jvm architecture
@ammulupriyanka7289
@ammulupriyanka7289 7 жыл бұрын
tnq mam
@Dipthakkar777
@Dipthakkar777 7 жыл бұрын
great videos, one suggestion - cut down time of videos by removing unwanted clips.
@singhanand1236
@singhanand1236 6 жыл бұрын
🙏🙏
@Codingmuni11
@Codingmuni11 Жыл бұрын
Durga sir is java father............
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions Жыл бұрын
Hello Deepak. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
@rahultej8352
@rahultej8352 7 жыл бұрын
The signature of compare is "compare(T o1, T o2);" not "compare(Object o1, Object o2);"
@darkillusionish
@darkillusionish 6 жыл бұрын
that is syntax
@jvsnyc
@jvsnyc 4 жыл бұрын
He casually mentions Generics near the beginning of the Collections part of the playlist, then he goes thru all of the Collections part of the playlist almost ignoring Generics, then comes back later and teaches Generics. I doubt it would still be presented that way today, and I commented on that in other places, but whatever.
@ankitadixit5875
@ankitadixit5875 5 жыл бұрын
My code is not running... Some 1 plz help
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Ankita. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@divyaprakash5128
@divyaprakash5128 7 жыл бұрын
perfect*1000000000
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 7 жыл бұрын
Hi Prakash. Thank you very much for your feedback
@sharadvijay7013
@sharadvijay7013 6 жыл бұрын
i dont want this BLOODY ascending output hahaha
@mayankkesari3687
@mayankkesari3687 7 жыл бұрын
Core Java With OCJP/SCJP: Collections Part-10 || string object in Treeset Example
1:50:08
Core Java With OCJP/SCJP: Collections Part-8 || TreeSet
1:16:30
Durga Software Solutions
Рет қаралды 208 М.
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
Difference between Interface and Absract Class
16:57
DURGA EDUCATION
Рет қаралды 972 М.
Core Java With OCJP/SCJP: Collections Part-7 || Setinterface||ShortedSet
1:20:55
Durga Software Solutions
Рет қаралды 209 М.
Core Java With OCJP/SCJP: Generics Part-1 || Introduction
44:31
Durga Software Solutions
Рет қаралды 197 М.
Collections - Difference between Arrays and Collections
10:43
Durga Software Solutions
Рет қаралды 650 М.
Core Java With OCJP/SCJP: Collections Part-17 || searching elements of list
59:35
Durga Software Solutions
Рет қаралды 127 М.
Core Java with OCJP/SCJP: Multi Threading Part-3 || The ways of defining a Thread Part-2
1:18:54
Difference between final, finally, finalize ?
10:07
DURGA EDUCATION
Рет қаралды
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН