import
[Link].*;
import [Link].*;
class Candidates
{
//Create the Constructor here
String name;
String locality;
int age;
public Candidates(String name,String locality,int age){
[Link] = name;
[Link] = locality;
[Link] = age;
}
class Interview_Candidates
{
boolean areNatives(ArrayList<Candidates> candidatesList)
{
//Enter your Code here
int res = (int)[Link]().filter((c) ->
[Link]("Native")).count();
return res == [Link]();
}
Candidates youngestCandidate(ArrayList<Candidates> candidates
List)
{
//Enter your Code here
[Link](candidatesList,(o1,o2) -> [Link] - o
[Link]);
return [Link](0);
}
}
public class Interview_CandidatesMain
{
public static void main(String[] args) throws Exception
{
BufferedReader br=new BufferedReader(new InputStreamReade
r([Link]));
ArrayList<Candidates> candidatesList=new ArrayList<>();
int n=[Link]([Link]().trim());
for(int i=0;i<n;i++)
{
String inp=[Link]();
String inparr[]=[Link]("-");
Candidates cnd=new Candidates( inparr[0], inparr[1],
[Link](inparr[2]) );
[Link](cnd);
}
Interview_Candidates ic=new Interview_Candidates();
boolean ans= [Link](candidatesList);
if(ans)
[Link]("All candidates are Natives");
else
[Link]("All candidates are not Native
s");
Candidates youngest=[Link](candidatesList
);
[Link]("Details of the Candidate with young
est age : Name = "+[Link]+", Locality = "+[Link]
y+", Age = "+[Link]);
}
}