List Implemented Classes
List Implemented Classes
Map Interface: key value pair, where keys are always unique and values may be duplicate.
HashMap :
SortedMap :
TreeMap:
String is characterArray.
Str.toCharArray();
import java.util.HashMap;
import java.util.Map;
class StringPrg {
//to check that currentChar is not in map, if not will add 1 count for firsttime
if(map1.get(currentChar) == null){
map1.put(currentChar, 1);
/*If it is repeating then simply we will increase the count of that key(character) by 1*/
else {
int max=0;
if(max<entry.getValue()){
max=entry.getValue();
maxCharacter=entry.getKey();
Java 8: Concepts:
{
MethodReferences:
Streams :
DateTime:
ErrorHandling: