remove duplicate characters in a string | by Java concepts by Jay tutorial |

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video I am going to explaining gear board remove duplicate characters in a string so I am going to taking one string here string Ram dupe correct here I'm just giving duplicate characters with a string okay see this is privacy a given I character twice and C character wise okay see now what I want to do here I need remove duplicate characters whatever I I and CC right so extra I added an extra C added so I I need to remove those so what will you do here so first I will go for creating object for set its implemented class of object I am going to creating okay set this is character right so this is I'm using generic right character string integer right this is set so set equals to I'm going to creating first set implementation class of object what so I'm going to taking here linked asset why I am going to taking here linked asset is nothing but ascending order it will come link your asset right these characters one by one remove duplicate elements and it will return ascending characters only right so observe Ctrl shift work so that it will import it packages will import it okay we can see here see observe now I am going to iterate this character is one by one right the string characters one by one I will go into iterating that means I'll going to take one by one character how will you do see fire hint I equal to zero I less than REM Duke dot length method I am going to using I plus plus now observe see here whatever we iterate these characters right everything in this for Loop right so these character we are go these characters okay these character we are going to ascending to the this set object right so now observe set dot add see each character we need to add so for that one what we need to do here we have one method carrot we need to pass right see we just added right each character we just iterate okay over a string okay this string we iterated and after that one each character we just added to this set object this is the process okay so after that one now we need to iterate overrun set object right so here character C set right I'm just using for each Loop so after that one just I'm writing CS out that means system.printled okay just printing this C now observe alt shift text J see we got what privacy c p r i v a c y see we just removed duplicate characters previously we have II double times right twice see here only one time it's game right so here also C is double time but here only one time we got right instead of printer and we can use this print only so now again I'm compelling and running all shift tags J see we got privacy right if you see this one left side and if you see right side here we can observe privacy so we observe this string we are just taking input as with duplicate characters but after running this program and we just remove duplicate characters and we got output what without duplicate characters we got right privacy don't forget to subscribe my channel and keep watching this is Jay signing off bye bye
Info
Channel: Java concepts by Jay tutorial
Views: 4,438
Rating: undefined out of 5
Keywords: java, java online compiler, java interview questions, java jdk download, java tutorial, java tutorial for beginners, remove duplicate characters, remove duplicate characters in a string in java, strings in java, strings programs in java, string remove character, string remove method in java, string remove in java, learn java programming for beginners, learn java coding, core java tutorial, core java full course, java technical interview questions and answers, java interview
Id: voa3Mm0ZdDk
Channel Id: undefined
Length: 6min 2sec (362 seconds)
Published: Mon Oct 31 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.