Learn from Leaders, Learn from ABC. Watch our latest technical videos in your language: For Hindi:- bit.ly/2TRuGVP For Kannada:- bit.ly/31NH63M For Telugu:- bit.ly/2MuYRRP For Tamil:- bit.ly/2Num5Hz
@rishavkumar79652 жыл бұрын
Now, this is the real definition of Marvellous. Totally Excellent.
@abhijeetgupta27545 жыл бұрын
Very awesome lectures. But sir there is one suggestion, please provide time complexity analysis also after each program.
@anushka32875 жыл бұрын
nice explanation, and animation
@Ankit-mq6em5 жыл бұрын
Kya English hai gajabb
@saurabhsingh70325 жыл бұрын
Set
@ashrafulalan64405 жыл бұрын
use import java.util.HashMap; above the program
@akhileshn79235 жыл бұрын
entrySet will give you both keys and values keySet will give you only keys values will give you only values m.entrySet will access keys and value and its of type Set and hmap is reference you can also write above line like this Set hmap = m.entrySet()
@ADITYAworld-sc3sv5 жыл бұрын
I recommend you to make lecture video in hindi also
@anjalichopra15405 жыл бұрын
Sir in your previous vedio ..to get the value, map.get[y(i)] was used ..but in this you are using , data.getvalue() ...why?
@akhileshn79235 жыл бұрын
here data is variable ..using variable name we can use getValue() method to access value in advance for loop
@ashwinilohar11695 жыл бұрын
for( Map.Entry data: hmap) Can only iterate over an array or an instance of java.lang.Iterable : compile time error is showing. How to remove it
@ashrafulalan64405 жыл бұрын
use import java.util.HashMap; above the program
@shivamsinha55542 жыл бұрын
After data:hmap.enterySet()
@vajjaramanjaneyulu73344 жыл бұрын
Supet
@akhileshn79235 жыл бұрын
//we can also use iterator import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import java.util.Set; public class String1 { public static void main(String[] args) { String x = "ARADHYA"; char y[] = x.toCharArray(); int size = y.length; HashMap hm = new HashMap(); int i=0; while(i!=size) { if(hm.containsKey(y[i])==false) { hm.put(y[i],1); } else { int oldval = hm.get(y[i]); int newval = oldval+1; hm.put(y[i],newval); } ++i; } Set set = hm.entrySet(); Iterator itr = set.iterator(); while(itr.hasNext()) { Map.Entry me = (Entry) itr.next(); System.out.println("key is "+me.getKey()+".."+"value is"+me.getValue()); } } }