
Lambdas e Interfaces Funcionales 2

Quiz
•
Computers
•
1st Grade
•
Medium
Jose Diaz
Used 4+ times
FREE Resource
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);
Similar Resources on Wayground
10 questions
Quiz on Reading Values from Console and Parsing in Java

Quiz
•
1st Grade
10 questions
Python basic B4

Quiz
•
1st Grade
10 questions
Quis PBO - Tek Informatika - D3 XVI

Quiz
•
1st - 2nd Grade
10 questions
Compro Q2 Operand

Quiz
•
1st Grade
10 questions
Struktu Data 1

Quiz
•
1st Grade
10 questions
Pernyataan Function dan Procedure

Quiz
•
1st - 3rd Grade
10 questions
UD2. Actividad 2.2 - Tipos de datos - Individual

Quiz
•
1st Grade
10 questions
For циклі

Quiz
•
1st Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
18 questions
D189 1st Grade OG 1c Concept 37-38

Quiz
•
1st Grade
20 questions
addition

Quiz
•
1st - 3rd Grade
20 questions
Subject and predicate in sentences

Quiz
•
1st - 3rd Grade
20 questions
Addition and Subtraction facts

Quiz
•
1st - 3rd Grade
20 questions
Place Value

Quiz
•
KG - 3rd Grade
10 questions
Exploring Properties of Matter

Interactive video
•
1st - 5th Grade
5 questions
Life at a pond

Quiz
•
1st Grade
14 questions
Plural Nouns Adding s and es

Quiz
•
1st - 2nd Grade