자바(2)
-
[ORC_Java Prep] 2. Local Variable Type Inference Local Variable Syntax for Lambda Parameters
All local variable declarations required an explicit type on the left side ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); -> Explicit type can be replaced by the reserved type name var -> var outputStream = new ByteArrayOutputStream(); 해설) 1) Line 11: Var to Declare the name field. But there is not enough context to infer the data type. 2) Line 12: Var to declare the breed fie..
2021.03.29 -
[ORC_Java Prep] 1. Java SE 11 Certification
1) Exam Overview 2) Prepare for an Exam 3) How to approach Questions 해설) 1) Firstly, we are creating a list of strings. And we have a return statement. (List to Stream converting-> this does NOT mean that this the result will return a stream) 2) In the return statement, we filter.(Still stream, but it's empty as we don't have Bart in the list) 3) We call findAny. (Any objects in the resulting st..
2021.03.29