Question: Assume that a list contains the string values as: United Kingdom, Ireland, United Kingdom, Germany, India, Mumbai, France, Britany, South Korea, Seoul } Consider the

Assume that a list contains the string values as: "United Kingdom, Ireland", "United Kingdom, Germany", "India, Mumbai", "France, Britany", "South Korea, Seoul"}
Consider the below codes:
i.
System.out.printin ("Places from United Kingdom:"); myPlaces.strean ()
. filter ((p) p.startsWith ("United Kingdom"))
map p.touppercase (*)
sorted ()
. forEach System,out.printin (p);
ii.
Collections? sort (myPlaces) ;
System. out.printin ("Places from United Kingdom:"),
for (String : myPlaces)
i.
if (s. startswith ("United Kingdom"));
] System. out.println (s. toUpperCase ()) ;
iii.
Collections. sort (myplaces) ;
System.out.printin ("Places from United Kingdom:");
for (String s: rypiaces)
i.
String value =3. toupperCase ();
if (value, startsWith ("UNITED KINGDOM"))
system. out. printin (s, toUpperCase ());
}
 Assume that a list contains the string values as: "United Kingdom,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!