
Lambdas e Interfaces Funcionales 2
Authored by Jose Diaz
Computers
1st Grade
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
6 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
3 mins • 1 pt
Which of the following expressions can be used to implement a Function<Integer, String> ?. Please select 3 options
(a)-> Integer.toHexString(a)
a -> Integer::toHexString
Integer::toHexString
i::toHexString
(Assume that i is a reference to an Integer object.)
(Integer a)-> Integer.toHexString(a)
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Please select 1 option.
Compilation error at //1
Compilation error at //2
15
-15
20
3.
MULTIPLE SELECT QUESTION
3 mins • 1 pt
Please select 3 options.
process(fnames, t::eat);
process(fnames, t::calories);
process(fnames, TestClass::size);
process(fnames, Carnivore::calories);
process(fnames, Tiger::eat);
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Which of the following interface definitions can be implemented using lambda expressions?. Please select 1 option.
interface A{
}
@FunctionalInterface
interface A{
default void m(){};
}
interface A{
void m(){};
}
interface A{
default void m1(){};
void m2();
}
@FunctionalInterface
interface A{
void m1();
void m2();
}
5.
MULTIPLE SELECT QUESTION
3 mins • 1 pt
Which of the following is/are a valid functional interface(s)?. Please select 3 options.
@FunctionalInterface
public interface FI{
int m1();
boolean equals(Object o);
}
@FunctionalInterface
public interface FI{
String toString = "VALUE";
int m1();
String m2(String s);
}
public interface FI{
int m1();
String toString();
}
@FunctionalInterface
public interface FI{
int m1();
default int m2(){ return 10; }
String toString();
}
@FunctionalInterface
public interface FI{
String toString = "VALUE";
boolean equals(Object o);
}
6.
MULTIPLE SELECT QUESTION
3 mins • 1 pt
Please select 2 options.
int a; String b;
Doer d = (a, b)->b.substring(0, a);
int a = 0; String b = "";
Doer d = (a, b)->b.substring(0, a)
Doer d = (a, b)->b.substring(0, a);
Doer d = (int a, String b)->b.substring(0, a);
Doer d = a, b->b.substring(0, a);
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
11 questions
Pseint
Quiz
•
1st Grade
10 questions
Programación c++
Quiz
•
1st Grade
9 questions
python基础知识练习
Quiz
•
1st Grade
11 questions
UKURAN DATA(2)
Quiz
•
1st Grade
10 questions
Programming
Quiz
•
1st - 10th Grade
10 questions
Introduction to Arrays
Quiz
•
KG - University
10 questions
Pseudo Code
Quiz
•
1st - 3rd Grade
10 questions
البرمجة بلغة الفيجول بيسك
Quiz
•
1st - 3rd Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Computers
20 questions
Telling Time to the Hour and Half hour
Quiz
•
1st Grade
10 questions
Exploring Rosa Parks and Black History Month
Interactive video
•
1st - 5th Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
13 questions
Fractions
Quiz
•
1st - 2nd Grade
20 questions
CVC Words
Quiz
•
KG - 1st Grade
15 questions
Place Value tens and ones
Quiz
•
1st Grade
16 questions
Money - Coins
Lesson
•
1st - 2nd Grade
20 questions
Halves and Fourths
Quiz
•
1st Grade