Question: Please answer quickly 1- You can implement any of the following methods that are declared inside the Lambdas interface as a lambda expression. public interface
Please answer quickly
1-
You can implement any of the following methods that are declared inside the Lambdas interface as a lambda expression.
public interface Lambdas {
void print();
void printOdds(int n);
}
Select one:
True
False
2-
What will be the output of the following code:
public class Demo{ public static void main(String[] args) { StringBuffer s1 = new StringBuffer("Complete"); s1.setCharAt(2,'i'); s1.setCharAt(7,'d'); System.out.println(s1); } }
Select one:
a.
Iomplede
b.
Coipletd
c.
Coimpletd
d.
Complete
3-
int x[] = int[]{10,20,30}; Arrays can also be created and initialize as in above statement.
Select one:
True
False
4-
In the following statement:
Employee e1=new Manager();
e1 is known to be a polymorphic variable, given that the Class Manager extends the Employee class.
Select one:
True
False
5-
A class that is declared as final can:
Select one:
a.
neither extend nor implement any classes or interfaces
b.
only extend abstract classes
c.
extend a single class and implement a single interface
d.
extend and implement multiple classes and interfaces
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
