Qtr No. 213, New Town Yehlanka Indore 454775
Given the code below what will be the output ?
@FunctionalInterface
interface StringFormatter {
public String format(String s1, String s2);
}
public class TestDemo {
public static void main(String[] args) {
StringFormatter sf1=(s1,s2)->{return (s1+s2);}; // Line 1
evalnput("Lambda ", "Expression",sf1);
StringFormatter sf2=(s1,s2)->{return (s1.toUpperCase())+" "+(s2.toUpperCase());}; // Line 2
evalnput("java", "se8 features",sf2);
}
public static void evalnput(String s1, String s2, StringFormatter sf) {
System.out.println(sf.format(s1, s2));
}
}
Lambda Expression
JAVA SE8 FEATURES
Lambda Expression
JAVA SE8 FEATURES
JAVA SE8 FEATURES
Lambda Expression
To get all Infosys Certified Java SE8 Professional Exam questions Join Group https://bit.ly/infy_premium_group
We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.
Qtr No. 213, New Town Yehlanka Indore 454775
admin@prepflix.in