I am impressed of your video and also I am first time commenting in any video.
@subramanianchenniappan40595 жыл бұрын
I am an experienced java developer. Please upload more videos. It will be helpful for interviews. Thanks for this video
@sabinchand48953 жыл бұрын
10:20 (Line 15) if(hm.get(tempString) != null) I think it checks 'value', not 'key'.
@KanagalingamJothi5 жыл бұрын
String key = "I am am learning java java "; String[] words = key.split(" "); HashSet set = new HashSet(); for (String s : words) { if (!set.add(s)) { Log.d("TAG", s); } else { set.add(s); } }
@chidanandasutar91052 жыл бұрын
Thanks for this video 🙏
@meghavikshatriya56372 жыл бұрын
I would say go with java 8 stream, it would be only one line of code!
@MsDhruv0013 жыл бұрын
Somewhere i have feeling that you made problem more complex while solving
@akshaybedre68043 жыл бұрын
Video ke starting me jo Audio hai. Kya nam hai uska???
@fafunmotavines5 жыл бұрын
You explain us in a very practical manner, easy to understand...
@suhedaerturk2152 жыл бұрын
Great explanation!
@ankitshah42115 жыл бұрын
Nice explanation
@simm56222 жыл бұрын
Thank you. 🏆🏆🏆
@sarath67895 жыл бұрын
Concise code String str ="I am am learning learning learning Java Java Java"; String []st=str.split(" "); int count=0; Map stor = new HashMap(); for(String s:st) { if(stor.containsKey(s)) { count++; stor.put(s,count); } else { count=1; stor.put(s,count); } }
@user1994gms4 жыл бұрын
Contains shouldn't be used which leads to performance issue
@mokshanachannel95874 жыл бұрын
What if string has"i am learning Java and Java"
@user1994gms4 жыл бұрын
@@mokshanachannel9587 above program is wrong.. If repeated words are not contiguous count will be wrong.. Consider 'am' word is in sentence. Count is 1.. Next word is different.. count is 1 Again 'am' in a sentence.. count++ becomes 2 Next word is different.. count is 1 Again 'am' here count should be 2+1, but the above program returns 1+1 which is incorrect
@thallasaikumar17783 жыл бұрын
i love the way you explain the things
@JoshMolina5 жыл бұрын
Great example! Thanks for sharing. Keep up the great work!
@vicentedominic27533 жыл бұрын
i know Im randomly asking but does anyone know a trick to log back into an Instagram account..? I was stupid forgot the account password. I would appreciate any assistance you can offer me!
@rogerwilder81853 жыл бұрын
@Vicente Dominic Instablaster =)
@vicentedominic27533 жыл бұрын
@Roger Wilder I really appreciate your reply. I found the site thru google and Im in the hacking process atm. Seems to take quite some time so I will reply here later when my account password hopefully is recovered.
@vicentedominic27533 жыл бұрын
@Roger Wilder it did the trick and I now got access to my account again. Im so happy! Thanks so much you saved my ass!
@rogerwilder81853 жыл бұрын
@Vicente Dominic You are welcome =)
@nishaant95 жыл бұрын
good one
@hasanath97024 жыл бұрын
How to remove duplicate in a string (using java) can you please make a video for that ...Thanks
@krish.gottipati3 жыл бұрын
Super bro,
@hondahnesscb35055 жыл бұрын
Starting music is same which Guru Maan Sir is using.
@prasannavadada63495 жыл бұрын
Awesome explanation brother keep rocking 🎸🎶🎶
@emilefeltesse3 жыл бұрын
Cool. But what if we want out the words in the same order as they appear in the initial sentence?
@shakelahmed97224 жыл бұрын
Great explaining.Keep it up...
@gamzeguresci55465 жыл бұрын
Hi thank you for the video. Can you also write the unit test for this example ?
@ganeshsurya81155 жыл бұрын
good boss
@nitinpatil11636 жыл бұрын
good explanation , whats happens in case of Variable? if there is same variable in both parent and child class then which one gets called ?
@anjaliyadav89293 жыл бұрын
Vdo👌
@tejeswarv4506 жыл бұрын
Awesome explanation sir .... representation is suuuuuper....
@singsarav5 жыл бұрын
Will it be easier if lambda was applied?
@rajp30596 жыл бұрын
Superb bro...keep rocking for ur explanation bro...
@sureshs25106 жыл бұрын
Really worth videos thanks a lot .. could you please prepare one video of java 8 features please
@SeleniumExpress6 жыл бұрын
Thanks, Suresh. Sure will prepare one soon.
@sureshs25106 жыл бұрын
Thanks for replying
@sourav27264 жыл бұрын
Just beautiful ❤️. make more videos man
@bhupendradhore85745 жыл бұрын
Why you have used iterator you can use for each loop for iterating through values
@harishbs895 жыл бұрын
Can use entrySet() which returns Entry Interface.
@sanjaypaudel32962 жыл бұрын
Namaste guru
@fafunmotavines5 жыл бұрын
Nicely explained....
@ansilbabariya97133 жыл бұрын
You can use containskey method instead of get
@sachingupta28593 жыл бұрын
Please try- Find occurrences of given substring in given string with optimized code.
@kajalsarawgi34575 жыл бұрын
thanks brother, you are teaching exactly the way i want. :)
@ankitpriyadarshi20285 жыл бұрын
Make videos on jdbc and core java
@VC-kj9yx6 жыл бұрын
Very nice tutorial
@SeleniumExpress6 жыл бұрын
Thanks, Vidhit.😊
@shobhitss5 жыл бұрын
If I want the input through excel and display the duplicates. How to do?
@karunakardatla20486 жыл бұрын
super explanation bro
@tabishrizwan91375 жыл бұрын
you can use in this way also it's simple like your previous program bro public class duplicatechar { private static void findDuplicateChar(String string) { char[] ch = string.toCharArray(); HashMap hm = new HashMap(); for (char c : ch) { if (hm.get(c) != null) { hm.put(c, hm.get(c) + 1); } else { hm.put(c, 1); } }
@umeshrgpv6 жыл бұрын
Do you know how to create videos using our own laptop.. which software can be used without any charges?
@playwithknight0076 жыл бұрын
what about spaces, if we have spaces how to remove that spaces while counting
@bhupendradhore85745 жыл бұрын
You can use replace function to replace space with no-space Replace(" ","") like this
@theLastOneTaken2 жыл бұрын
Instead of hashmap u should've used set cuz it doesn't store duplicate values...
@AmeyaNanarkar766254 жыл бұрын
Why not used hm.contains(tempString) in if condition at line 15
@reddydivya80556 жыл бұрын
Thanks sir! Great explanation
@Mylastpage6 жыл бұрын
static void findDuplicate(String text) { String[] strAr = text.split(" "); Set set = new HashSet(); Map map = new HashMap(); for(int i=0;i
@IASGURUADVANCEPREPARATION6 жыл бұрын
Bro can know to make the table format (match type questionsin strings
@aniketchoubey20276 жыл бұрын
Awwsome thnks
@abulhasanath14714 жыл бұрын
print duplicate characters in a string (using java) can you please make a video for that also how to remove duplicate string or char ..thank you
@damodaranm30444 жыл бұрын
if u want a video cantact me in whatsapp +917358252858
@hasanath97024 жыл бұрын
@@damodaranm3044 How to remove duplicate in a string (using java) can you please make a video for that ...Thanks using same code
@jimmyfallon18905 жыл бұрын
I paused the video and did a dirty log(n)2 version.... String str = "I am am learning java java "; String[] result = str.split(" "); ArrayList list = new ArrayList(); for(int i = 0; i
@SauravKumar-cs4oj5 жыл бұрын
Good code but what in case we also want the count of the repeated words?
@bulutcakan30486 жыл бұрын
why you did not use SET for find duplicate values.
@iam_ms97235 жыл бұрын
Because we needed key and values pair so here he's using map
@sauravSingh0375 жыл бұрын
Thank you 😊😘❤️
@abhijeetdeshmukh91385 жыл бұрын
What if string contains punctuation marks like "I am working on java. Because java is my favourite language." In this case java is not showing as duplicate word. Because there is full stop. Please explain one example with punctuation mark.
@fafunmotavines5 жыл бұрын
First split based on punctuation using regex and one more for loop...that will work
@randomize80536 жыл бұрын
why we used iterator there , am not getting it ?
@Uda_dunga6 жыл бұрын
to iterate ..its just like for loop
@xcreatorminigames62276 жыл бұрын
Very nice friend, but you can use the computer to work as a blackbord, so we can see your writings better, and the sound is better too :-)
@SeleniumExpress6 жыл бұрын
Thank you, Vinicius.. I will keep your suggestions in mind. Thank you for taking time and writing a feedback. Have a nice time 😊
@akkitech62595 жыл бұрын
String s="this is java program" I want to find the index of 'is' in string. But when I find using indexOf("is") it return the index of first is which is in 'this' word. Can u tell me how to find that....
@rkoustubha96645 жыл бұрын
In your case, you can use lastIndexOf("is")
@basernishant4 жыл бұрын
use " is" give some gap i think
@SreeConnects5 жыл бұрын
nice but very lengthy code
@kothiyan56555 жыл бұрын
Can anyone explain hm.put(tempting,him.get(tempstring)+1)
@Mylastpage6 жыл бұрын
concurrentHaspMap would not be better? where you are iterating, you can remove all the elements having value 1.
@manikanta7836 жыл бұрын
Frd super videos, but I want how to remove duplicates in string
@r.o.93224 жыл бұрын
ArrayList d = new ArrayList(); String sentence = "I am am learning Java Java"; String[] s = sentence.split(" "); for (String a : s) { if(!d.contains(a)) { d.add(a); } } System.out.println(d);
@kraljeliman27486 жыл бұрын
"right?"
@harshittiwari39476 жыл бұрын
Bro make a method in java that iterate prime number between 0-200 and return the prime number between 0-20 and 70-90
@SeleniumExpress6 жыл бұрын
Hi Harshit.Hope below code will help.Revert back for any further query. static void check() { ArrayList list = new ArrayList(); for(int i = 0 ; i= 0 && tempInt = 70 && tempInt
@suyashsahu45466 жыл бұрын
or u can simply write like this.. for (Iterator iterator = a.iterator(); iterator.hasNext();) { Integer obj = (Integer) iterator.next(); if (obj>=2 && obj=70 && obj
@damodaranm30444 жыл бұрын
i wonder why do u use hashmap any datastucture can do this String str = "i am am learning java java"; String[] arr = str.split(" "); ArrayList al = new ArrayList(); for(int i = 0 ; i < arr.length ; i++ ) { if(!al.contains(arr[i])) { al.add(arr[i]); } else { System.out.println(arr[i]); } } }
@sachinsahu8176 жыл бұрын
{ map.put(str1, map.get(str1) + 1); } this line is not working. error message - The operator + is undefined for the argument type(s) Object, int can you please what I can do here? Thanks in Advance.
@krishnasingh91116 жыл бұрын
I am getting same error if resolve please post your solution ..
@JP-yf2kp6 жыл бұрын
you cannot get such a error:- check this program package myapp; import java.util.HashMap; import java.util.Map; public class DuplicateString { public static void main(String[] args) { String str = "I am am learning java java"; DuplicateString obj = new DuplicateString(); obj.calculateDuplicateString(str); } public void calculateDuplicateString(String str) { Map string_literals_map = new HashMap(); String [] str_array = str.split(" "); for (String str_literals : str_array) { //System.out.println(str_literals); if(string_literals_map.containsKey(str_literals)) { string_literals_map.put(str_literals, string_literals_map.get(str_literals) + 1); } else { string_literals_map.put(str_literals, 1); } } System.out.println(string_literals_map); } }
@JP-yf2kp6 жыл бұрын
@@krishnasingh9111 package myapp; import java.util.HashMap; import java.util.Map; public class DuplicateString { public static void main(String[] args) { String str = "I am am learning java java"; DuplicateString obj = new DuplicateString(); obj.calculateDuplicateString(str); } public void calculateDuplicateString(String str) { Map string_literals_map = new HashMap(); String [] str_array = str.split(" "); for (String str_literals : str_array) { //System.out.println(str_literals); if(string_literals_map.containsKey(str_literals)) { string_literals_map.put(str_literals, string_literals_map.get(str_literals) + 1); } else { string_literals_map.put(str_literals, 1); } } System.out.println(string_literals_map); } }
@manish13156 жыл бұрын
bhai itni coding to kabhi yaad nahi hogi kya golmaal hai hasmap to java mein mene abhi padha bhi nahi hai dara diya apne mujhe
@SeleniumExpress6 жыл бұрын
Hi Manish, I appreciate ki apne at list video dekha, hashmap ka concept Na jante huea v.. Mein jab Ye Sab sikhta tha, I also had the same feelings and even I was not trying to watch these kind of programs. 😀so you are already doing better than me 👍 So avi Apko pehele hashmap ka concepts sikhna hai.. Then you need to play with these logic's. And before you try solving any kind of logic, make sure you know ki app Kya karne Ja rahe ho.. Then Ye Bahot asan lagega.. I know you can do it once you understand the concept 😊👍
@manish13156 жыл бұрын
@@SeleniumExpress sir ek last question meine bsc cs last year complete kar loonga lekin abhi tak hamein is baare mein bataya kyun nahi sir mene java ka course bhi kiya tha lekin unhone bhi is baare mein nahi bataya kya ye advanced level ka to nahi hai vaise mein java ke advanced level like jsp servlet , netbeans ide project , like stand alone applicaiton , mysql sever , etc ke baare mein janta hoon kya kisi company mein interview ke liye java ke core concept hi puchhe jaate hai koi netbeans ke graphical question nahi puchta kya please help
@SeleniumExpress6 жыл бұрын
Manish,ye sare logical programs interviews mein Bahot importance rakhte hain.. Most of the time the first round is problem solving round where you will get questions like this.. So ap collection framework pe jyada homework kijiye.. Because most of the questions you will get from there.
@princegamingff37445 жыл бұрын
hi plz upload some video
@rishirakh13 жыл бұрын
I thought I opened Guruman fitness video 😂
@vinayakkanade17823 жыл бұрын
public static void countDuplicateWord(String string){ String sourceArr[] = string.split(" "); Map stringIntegerMapMap = new HashMap(); for (String str : sourceArr) { Integer previousValue = stringIntegerMapMap.put(str, 1); if (previousValue != null) { stringIntegerMapMap.put(str, previousValue + 1); } } System.out.println(stringIntegerMapMap); } public static void countDuplicateCharacter(String word){ Map characterIntegerMap = new HashMap(); for (int i = 0; i < word.length(); i++) { Integer previousValue = characterIntegerMap.put(word.charAt(i), 1); if (previousValue != null) { characterIntegerMap.put(word.charAt(i), previousValue + 1); } } System.out.println(characterIntegerMap); }
@KanagalingamJothi5 жыл бұрын
String key = "I am am learning java java "; String[] words = key.split(" "); for (int i = 0; i < words.length; i++) { for (int j = i + 1; j < words.length; j++) { if (words[i].equalsIgnoreCase(words[j])) { Log.d("TAG", words[i]); } } }
@mohitpant84315 жыл бұрын
But in this case time complexity is O(n^2).
@ViratKohali.television6 жыл бұрын
how to sovle xml parsing error in spring
@mrnagalakshmi934 жыл бұрын
Annoying slang... sorry... unable to graspe the content coz of this slang.... looks artificial....
@Raj-ql2vz2 жыл бұрын
U copied background music from gurumann
@abhay62762 жыл бұрын
You are creating complex coding...when beginners will watch your coding then he will suicide...
@ytbshorts17412 жыл бұрын
😂😂😂
@sivaprasad83333 жыл бұрын
No clarity
@aazaa73342 жыл бұрын
String str1 = "I am am walking walking java java java java"; String[] strings = str1.split(" "); Map myMap = new HashMap(); for(String x : strings){ if(!myMap.containsKey(x)){ myMap.put(x,1); } else{ myMap.put(x,myMap.get(x) + 1); } } Set keys = myMap.keySet(); for(String key: keys){ if(myMap.get(key)> 1){ System.out.println(key); } }