And we call entry of 1 pair of key and value.
1 ---coder
Key is 1 and value is coder and pair of this called entry and to maintain this entry nested interface of map Interface entry interface is used why this interface is used to store pair of key values if u want to fetch all data of map so the type of pair of key value is entry type and entry is nested interface of Map.
Interface Map{
Interface Entry{
}
}
If you want to use nested interface then you write first name of parent interface then child interface you can’t use entry directly (Map.Entry) inside map type of pair of key value is entry type.
If you want to fetch data from map and you want only key then you run map method of keyset and hold it in the variable of Set and if u want values then you can run values method and hold into the list variable but if you want all entry then pair of key value and this will be an entry and to fetch that entry in Map interface 1 method is entry and when this method return data of map then we typecast into (Map.entry).
Anonymous Inner class: in this we create an interface but we are not implementing this interface in our main class we are creating Anonymous Inner class and for A parent Interface must be there like in my case I interface is there so when we compile it then 3 class file will be created 1 for interface I and another for
AnonymousClassUsingLambdaExpression and 1 more class file is AnonymousClassUsingLambdaExpression$1 so in this case 3 file is generated we can solve this memory wastage by using lambda expression.