Core Java With OCJP/SCJP: Collections Part-10 || string object in Treeset Example

  Рет қаралды 202,417

Durga Software Solutions

Durga Software Solutions

Күн бұрын

Пікірлер: 105
@DeshiIndianFamily
@DeshiIndianFamily 7 жыл бұрын
India needs more teacher Like you. Things in which I'm struggling is now crystal clear. Thanks for everything.
@tanishmahajan-xj8lt
@tanishmahajan-xj8lt 7 жыл бұрын
Very nice Explanation Sir....Sir You are the Aanand kumar(Super 30) of Java Language. Your explanation is very heplful for All the Students who wants to Learn java beacause Learning java via another source or by any other faculty is very very difficult ....Durga sir is the only one who make java as simple as possible for students....Through durga sir knowledge, we can give left and right to the interviewer and sir is passionate about java..by getting a knoeledge from the durga sir session now I can think manually how to work in real time...salute to durga sir for their dedication and thank you so much sir. In my life time I want to see you once...Ultimate teaching style sir....superbb I am a big fan of your sir...once again thank you so much durgasoft team and special thanx to durgasir from the bottom of my Heart....Tanish Mahajan
@shashikumarmacha9972
@shashikumarmacha9972 5 жыл бұрын
Me to bro...
@rishabhpathak1367
@rishabhpathak1367 5 жыл бұрын
Sir can I learn Coding from Durga Sir videos??
@debarshibhattacharyya6542
@debarshibhattacharyya6542 3 жыл бұрын
I completely agree...Best teacher of Java in my opinion. I have gone through multiple resources, I think but durga sir's java videos as the best!!
@EngineerVaibhav
@EngineerVaibhav Жыл бұрын
Attention⚠ In new versions StringBuffer and StringBuilder also implementes Comparable interface... ❤
@tejeswarpala2841
@tejeswarpala2841 2 жыл бұрын
why i prefer watching your long videos than other short videos is that concepts are going very strong into head.
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 2 жыл бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@wilfred-almeida
@wilfred-almeida 4 жыл бұрын
Starting from jdk 11, StringBuffer has implemented Comparable.
@shushantsinghrajput1152
@shushantsinghrajput1152 8 ай бұрын
thanks
@Phoenix-lg3mr
@Phoenix-lg3mr 4 ай бұрын
Thank you
@rockbrand753
@rockbrand753 4 жыл бұрын
thank you so much sir you explained Java Language in a very very detailed way with depth. Now it is easy to understand to anyone, it does not matter whether students are from CS background or not. you are a genius in Java Language. Thank you thank you thank you sir for clearing my all doubts, thank you for providing the most valuable knowledge freely to us on youtube. God will give a lot of Happiness, Health, and wealth to you. Love you sir.... love you ....
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Friend. 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
@akashgupta-dq8ie
@akashgupta-dq8ie 5 жыл бұрын
i really want to know why those 13 dislikes are there ,what is the reason ? ,The durga sir is the great teacher ,sir thanks for all collection tutorial videos ,God bless you
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Akash. 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
@dinkarinjosh
@dinkarinjosh 5 жыл бұрын
They are followers of the political party, he gave example from.. lol..
@navinsingh2784
@navinsingh2784 4 жыл бұрын
They want to learn everything in 1 hour i guess 🤣
@utsavmodh9698
@utsavmodh9698 9 ай бұрын
🎉This video was incredibly informative and well-made.🎉 Thank you for sharing this priceless knowledge ✨
@srivani657
@srivani657 6 жыл бұрын
sir the knowledge we get from your classes is of great worth.We have to refer many books or articles to get this type of stuff.Through your classes we are able to achieve that easily.Thanks again..
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Sri Vani. 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
@joeljacob4685
@joeljacob4685 8 ай бұрын
This is the best explanation on Comparator so far..... ❤❤ you made everything crystal clear❣
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 8 ай бұрын
Hello Friend. 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
@stockeducationhub8500
@stockeducationhub8500 Жыл бұрын
Nobody is like you, In one word you are great.🙏
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions Жыл бұрын
Hello Friend. 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
@saiprabath6459
@saiprabath6459 5 жыл бұрын
Thank you very much sir , you are the Best.. Java Mega Power Star Durga sir
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Sai Prabath. 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
@sathyanhere
@sathyanhere 7 жыл бұрын
Thanks a lot for all ur videos. Its very help full to understand the concept in depth and ur teaching style is awesome. below is my observation, pls correct if i am wrong. Without using Comparator, we can convert StringBuffer toString, will give the same result. TreeSet t = new TreeSet(); t.add(new StringBuffer("Test").toString()); t.add(new StringBuffer("NewTest").toString());
@mmcooe
@mmcooe 6 жыл бұрын
You are too good Durga Sir! Hats off to you!! Your videos have been very helpful to me
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello mmcooe. 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
@sonnix31
@sonnix31 6 жыл бұрын
Again Thank You. Thank You.
@ranveervaghela7030
@ranveervaghela7030 3 ай бұрын
Completed watching on Oct 08, 2024 at 9.58 PM :) :)
@shubhi2648
@shubhi2648 8 жыл бұрын
Thanks for awesome videos. Can you please elaborate why equals is included in Comparator(I) ? What is it's purpose?
@ahmidahmid9303
@ahmidahmid9303 5 жыл бұрын
too much knowledge thanks my mind is full for now
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Ahmid. 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..:)..:)
@viveksharma878
@viveksharma878 5 жыл бұрын
Sir You are Excellent and wonderful
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Vivek. 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
@Lakshmankablog
@Lakshmankablog 2 жыл бұрын
🤩👏👌🐎🥳
@VikasSingh-dm2oi
@VikasSingh-dm2oi 4 жыл бұрын
sir in newer version of java Stringbuffer implements comparable
@yeshwantpatil8810
@yeshwantpatil8810 3 жыл бұрын
Yes you are right !!
@nadar236
@nadar236 7 жыл бұрын
Nice Explanation
@mahendharkhedhar7887
@mahendharkhedhar7887 8 жыл бұрын
love durgasoft
@rizwanshahid1447
@rizwanshahid1447 7 жыл бұрын
Thanks so much, Durga Sir.
@divyatej.a1553
@divyatej.a1553 3 жыл бұрын
sir @ 21:00 why Stringbuffer whynot String? why to convert StringBuffer to String? why not pass directly String?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Divya. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@lpriya097
@lpriya097 4 жыл бұрын
thank you sir
@AnkitaRai-yx5ww
@AnkitaRai-yx5ww Жыл бұрын
ThAnks sir
@vijayajampani639
@vijayajampani639 6 жыл бұрын
your explanation is excellent sir could you please explain how to sort linked list by using comparator
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Vijaya. 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
@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. 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
@rohitgupta025
@rohitgupta025 7 жыл бұрын
Thank you Sir for the video
@EngineerVaibhav
@EngineerVaibhav Жыл бұрын
145 video completed.. 🎉❤
@chemejee7347
@chemejee7347 Ай бұрын
Sir you said that treeset not allow heterogeneous object but you insert string and stringbuffer object in treeset how?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions Ай бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@KarthikC-ju4fx
@KarthikC-ju4fx 6 ай бұрын
Hi , Natural sorting order of StringBuffer works well in TreeSet (java 11). but you have mentioned not working.. please clarify
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 ай бұрын
Hello Karthik. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@maharshimahi7512
@maharshimahi7512 8 жыл бұрын
sir please upload. ' durga sir string manipulation ' videos
@rajatgoyal1491
@rajatgoyal1491 5 жыл бұрын
At 39:08 is the program allow duplicates??
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Rajat. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@vedantsingh7011
@vedantsingh7011 4 жыл бұрын
No duplicates will be allowed as there length will same then else part will execute Default compareTo() method and in that if two strings are same then it will return Zero and that string will be ignored."A".compareTo("A") will retrun zero.
@mohanshrawankar6219
@mohanshrawankar6219 3 жыл бұрын
Hello durga sir, Sir for sorting heterogeneous non comparable objects can we take combination of int and string instead of string and stringbuffer ?? Can you please provide program for SortedSet??
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 3 жыл бұрын
Hello Mohan. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@Shinestart-l9q
@Shinestart-l9q Жыл бұрын
Sir I have one doubt You have used comparable for natural sorting on empid. but for string sorting u have used comparator. Don't we use natural sorting for alphabet checking?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions Жыл бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@devashishchoubey1965
@devashishchoubey1965 6 жыл бұрын
Thnx sir
@shashikumarmacha9972
@shashikumarmacha9972 5 жыл бұрын
Thank u very much sir... I saw total 199 videos.. Sir in this video... Comparator example not executing in 1.8v.. Why sir.. Wt is d reason....
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Shashi Kumar. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@laljitsingh6790
@laljitsingh6790 8 жыл бұрын
endless sir
@vineetkumar8643
@vineetkumar8643 4 жыл бұрын
Sir, what is the use of equals() method in Comparator?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Vineet. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@Astra2391
@Astra2391 4 жыл бұрын
Sir Can we implement sorting for homogeneous data of two element simultaneously e.g if we take String name and string department as input so I want my output should be of alphabetical order of name & department both simultaneously. Please let me know how
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Parag. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@sumitkhandelwal4962
@sumitkhandelwal4962 4 жыл бұрын
Sir , new version bhi upload krdo java ke
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 жыл бұрын
Hello Sumit. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@navjotlalganj4491
@navjotlalganj4491 6 жыл бұрын
nice sir
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Chaudhary. 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
@-AjayChauhan
@-AjayChauhan 8 ай бұрын
Completed this video Day 64 of #75daysofcode in Java 19 May, 2024
@sahuamit30
@sahuamit30 7 жыл бұрын
You are awesome...so nicely expalined and presented.. one doubt how add(object) calls internally to comapareto() method could you explain ? and how Treeset t = new TresSet(Comparator r ) gives Treeset Comparator property ?
@sudhanshupatwardhan9900
@sudhanshupatwardhan9900 7 жыл бұрын
Agree!! Very well explained. I have the same doubt. Durga Sir, Can you please resolve this query? Thanks in Advance!!
@aryalnaveen
@aryalnaveen 7 жыл бұрын
When you create the object of TreeSet using 'new' keyword, it creates the instance of TreeMap. And calling 'add( )' method of TreeSet internally calls the 'put( )' method of TreeMap(), where it calls the comapre( ) method.
@siddharth4484
@siddharth4484 6 жыл бұрын
53:40
@sakthivelraja6658
@sakthivelraja6658 7 жыл бұрын
Can we write own sorting by comparable (compareTo(ob j) ? Example : we can also compare Employee name compareTo() method itself . But Which one is good to choose ?
@momedalhouma14
@momedalhouma14 6 жыл бұрын
why can't we use comparator for stringbuilder object ? i meand we can cast StringBuffer to String Object and use that string to call the compareTo method.
@pareshsojitra8828
@pareshsojitra8828 6 жыл бұрын
Hi Sir, Internally HashSet using HashTable thats fine, But in HashSet Constructor they have used the HashMap() object to create the HashSet class object. public HashSet() { map = new HashMap(); } Here i am not clear about that, How the HashTable actually used internally in HashSet ? Could you please help me out
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Sojitra. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627,7207212427/28
@kutra100
@kutra100 4 ай бұрын
Is k.add("a r rahman") valid ?
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 4 ай бұрын
Hello Friend. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@ashqarkhan1086
@ashqarkhan1086 6 жыл бұрын
One doubt, if anyone can help me out. Does Comparator implements Comparable Interface ?? If not then how we are using compareTo() method of comparable interface in MyComparator class which implements Comparator.
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 жыл бұрын
Hello Aashqar Khan. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@jananinagaraju8444
@jananinagaraju8444 5 жыл бұрын
Do you get answer for your question? if so, can you please post it.
@ankitadixit5875
@ankitadixit5875 5 жыл бұрын
Yeah...and that is why programm while executing showing error
@kalimyahya7585
@kalimyahya7585 5 жыл бұрын
CompareTo is used for string in mycomparator class and string implements compareTo method
@dreamcatcher9712
@dreamcatcher9712 5 жыл бұрын
No comparator doesn't implement comparable,if it implements comparable then the class which implements comparator must have to implement both interface class methods which doesn't make any sense. Since string class implements comparable interface, we can call compareTo( ) method on it's object Eg: public Demo{ public static void main(String args[ ]) { System.out.println("a".compareTo("b"));} } O/p: -1 Hope it helps :)
@dinkarinjosh
@dinkarinjosh 5 жыл бұрын
StringBuffer is comparable. I am not sure why he is saying StringBuffer does not implement Comparable. EDIT: Java 11 which is LTS, has started to implement Comparable to StringBuffer. Thanks to @Shikanjiwala for helping me to improve upon my comment.
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 5 жыл бұрын
Hello Dinkarinjosh. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
@asheeshkumar1424
@asheeshkumar1424 5 жыл бұрын
भाई तू कही से गलत पढ़ लिया है । ठीक से चेक कर ।
@vedantsingh7011
@vedantsingh7011 4 жыл бұрын
@@dinkarinjosh Bro Now you are checking in your updated java.Video is 4 years old at that time StringBuffer does not implement Comparable.As you only saying "java 11 StringBuffer has started to have comparable." That's true but earlier version does'nt implement Comparable. docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html Hope now it will be clear
@jvsnyc
@jvsnyc 4 жыл бұрын
It is worse than that. It is highly dangerous to place any kind of mutable object in a HashSet or TreeSet, or as a key in a HashMap or TreeMap. If it changes the whole Set or Tree is now broken. This is the reason that StringBuilder/StringBuffer, which are classical cartoon stereotypes of the most mutable objects, didn't bother to implement it. I am not necessarily saying that it was the wrong thing to do it, but maybe they got jealous of C++ and how easy it was to blow yourself up or run yourself over in C++.
@maharshimahi7512
@maharshimahi7512 8 жыл бұрын
sir please upload. ' durga sir string manipulation ' videos
@dhanushsivajaya1356
@dhanushsivajaya1356 3 жыл бұрын
Thankyou sir
@KarthikC-ju4fx
@KarthikC-ju4fx 6 ай бұрын
Hi , Natural sorting order of StringBuffer works well in TreeSet (java 11). but you have mentioned not working.. please clarify
@DurgaSoftwareSolutions
@DurgaSoftwareSolutions 6 ай бұрын
Hello Karthik. Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
Core Java With OCJP/SCJP: Collections Part-11 || Map || Hashmap || linked Hashmap
1:24:06
Core Java With OCJP/SCJP: Collections Part-14 || hashtable
1:36:34
Durga Software Solutions
Рет қаралды 222 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
StringBuffer Class & Methods in Java with Example
38:26
Smart Programming
Рет қаралды 166 М.
Core Java with OCJP/SCJP: Exception Handling Part-1 || Introduction
54:53
Durga Software Solutions
Рет қаралды 500 М.
Core Java With OCJP/SCJP: Collections Part-18 || Arrays
1:10:35
Durga Software Solutions
Рет қаралды 124 М.
It took me 15+ years to realise what I'll tell you in 15 minutes...
14:21
Core Java With OCJP/SCJP: Collections Part-15 || queue
57:26
Durga Software Solutions
Рет қаралды 171 М.
Inner Class Java Tutorial - Creating and Using Inner Classes
8:21
Coding with John
Рет қаралды 138 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН