InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
On which of these can annotations be used on in Java 8? |
|
Answer» On which of these can annotations be used on in JAVA 8? |
|
| 2. |
Type annotation is used to depict the non-blank string value _________ |
|
Answer» Type ANNOTATION is used to depict the non-blank string value _________ |
|
| 3. |
Repeating annotations can be added with which of the following declarations? |
|
Answer» Repeating annotations can be ADDED with which of the following declarations? |
|
| 4. |
Identify the intermediate and terminal operations in the code. |
|
Answer» Identify the intermediate and terminal operations in the code. |
|
| 5. |
The terminal operation produces another stream as its output. |
|
Answer» The terminal OPERATION produces another stream as its output. |
|
| 6. |
Optional type validation can be used to substitute runtime validations. |
|
Answer» Optional type validation can be USED to substitute runtime validations. |
|
| 7. |
The newly introduced Streams API is available in which package of Java 8? |
|
Answer» The newly INTRODUCED STREAMS API is AVAILABLE in which PACKAGE of Java 8? |
|
| 8. |
Which of the following is a valid Stream operation type? |
|
Answer» Which of the following is a valid STREAM operation type? |
|
| 9. |
If you wanted to process a stream of names, extract the male names, and store them in a new list, what is the appropriate operation to be used? |
|
Answer» If you wanted to PROCESS a stream of names, extract the male names, and STORE them in a new list, what is the appropriate operation to be used? |
|
| 10. |
Which of these does Stream filter() operates on? |
|
Answer» Which of these does Stream filter() OPERATES on? |
|
| 11. |
Which method is used to connect the consumer to the source in reactive programming? |
|
Answer» Which method is used to connect the CONSUMER to the source in reactive PROGRAMMING? |
|
| 12. |
Repeating annotations can be retrieved using _________ |
|
Answer» REPEATING ANNOTATIONS can be retrieved using _________ CHOOSE the correct option from below list (1)getAnnotations() (2)getAnnotationsList() (3)getAnnotationsByValue() (4)getAnnotationsByType() ANSWER:-(4)getAnnotationsByType() |
|
| 13. |
An example of functional interface in Java 8 is __________ |
|
Answer» An example of FUNCTIONAL interface in JAVA 8 is __________ |
|
| 14. |
Reactive Programming deals with ____________ |
|
Answer» REACTIVE Programming DEALS with ____________ Choose the correct option from below LIST (1)Asynchronous DATA (2)None of the OPTIONS (3)Synchronous data (4)Both the options Answer:-(1)Asynchronous data |
|
| 15. |
Which package contains Date/Time (JSR 310) API in Java 8? |
|
Answer» Which package contains Date/Time (JSR 310) API in JAVA 8? |
|
| 16. |
Choose the correct output in Java8 Innards |
|
Answer» Choose the CORRECT output in Java8 Innards |
|
| 17. |
Choose the correct option based on this code segment in Java8 Innards |
|
Answer» CHOOSE the CORRECT option based on this code segment in JAVA8 Innards import java.util.Optional; public class App { public STATIC VOID main(String[] args) { String[] str = new String[10]; str[5] = null;; str[4] = "JAVA OPTIONAL CLASS EXAMPLE"; Optional< String> checkNull = Optional.ofNullable(str[5]); if(checkNull.isPresent()){ // It Checks, value is present or not String lowercaseString = str[5].toLowerCase(); System.out.print(lowercaseString); }else System.out.println("String value is not present"); } } Choose the correct output. (1)String value is not present (2)Runtime error: Null pointer Exception (3)Java optional example (4)Compilation error Answer:-(1)String value is not present |
|
| 18. |
In Functional Reactive programming, we pull the stream of data. |
|
Answer» In Functional Reactive programming, we pull the STREAM of data. |
|
| 19. |
Stream operation iterations are internal over the source of elements. |
|
Answer» Stream operation ITERATIONS are internal over the source of elements. |
|
| 20. |
Lambda expressions are based on____________ |
|
Answer» Lambda expressions are BASED on |
|
| 21. |
Lambda expressions in Java allow us to treat ___________ |
|
Answer» Lambda expressions in Java allow us to treat ___________ |
|
| 22. |
Which of the following is correct about Java 8 lambda expression? |
|
Answer» Which of the following is correct about Java 8 lambda expression? |
|
| 23. |
Which of the following is the correct lambda expression, which adds two numbers and returns their sum? |
|
Answer» Which of the following is the correct LAMBDA EXPRESSION, which adds two numbers and RETURNS their sum? |
|
| 24. |
Choose the correct option based on this code segment in Java8 Innards Qsn |
|
Answer» Choose the correct option based on this code SEGMENT in JAVA8 Innards |
|
| 25. |
Choose the correct option based on this code segment |
|
Answer» Choose the correct OPTION based on this CODE segment |
|