You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-43Lines changed: 43 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -3708,15 +3708,15 @@ class Visitor{
3708
3708
* Added utility `jdeps` for analyzing .class files.
3709
3709
3710
3710
<divalign="right">
3711
-
<b><a href="#">↥ back to top</a></b>
3711
+
<b><a href="#related-topics">↥ back to top</a></b>
3712
3712
</div>
3713
3713
3714
3714
## Q. Can you declare an interface method static?
3715
3715
3716
3716
Java 8 interface changes include static methods and default methods in interfaces. Prior to Java 8, we could have only method declarations in the interfaces. But from Java 8, we can have default methods and static methods in the interfaces.
3717
3717
3718
3718
<divalign="right">
3719
-
<b><a href="#">↥ back to top</a></b>
3719
+
<b><a href="#related-topics">↥ back to top</a></b>
3720
3720
</div>
3721
3721
3722
3722
## Q. What is a lambda?
@@ -3804,7 +3804,7 @@ public static void main ( String [] args) {
3804
3804
```
3805
3805
3806
3806
<divalign="right">
3807
-
<b><a href="#">↥ back to top</a></b>
3807
+
<b><a href="#related-topics">↥ back to top</a></b>
3808
3808
</div>
3809
3809
3810
3810
## Q. What variables do lambda expressions have access to?
@@ -3818,7 +3818,7 @@ Access to external scope variables from a lambda expression is very similar to a
3818
3818
The default methods of the implemented functional interface are not allowed to be accessed inside the lambda expression.
3819
3819
3820
3820
<divalign="right">
3821
-
<b><a href="#">↥ back to top</a></b>
3821
+
<b><a href="#related-topics">↥ back to top</a></b>
3822
3822
</div>
3823
3823
3824
3824
## Q. How to sort a list of strings using a lambda expression?
@@ -3831,7 +3831,7 @@ public static List < String > sort ( List < String > list) {
3831
3831
```
3832
3832
3833
3833
<divalign="right">
3834
-
<b><a href="#">↥ back to top</a></b>
3834
+
<b><a href="#related-topics">↥ back to top</a></b>
3835
3835
</div>
3836
3836
3837
3837
## Q. What is a method reference?
@@ -3852,7 +3852,7 @@ public static void main ( String [] args) {
3852
3852
Method references are potentially more efficient than using lambda expressions. In addition, they provide the compiler with better information about the type, and if you can choose between using a reference to an existing method and using a lambda expression, you should always use a method reference.
3853
3853
3854
3854
<divalign="right">
3855
-
<b><a href="#">↥ back to top</a></b>
3855
+
<b><a href="#related-topics">↥ back to top</a></b>
3856
3856
</div>
3857
3857
3858
3858
## Q. What types of method references do you know?
@@ -3862,15 +3862,15 @@ Method references are potentially more efficient than using lambda expressions.
3862
3862
* to the constructor.
3863
3863
3864
3864
<divalign="right">
3865
-
<b><a href="#">↥ back to top</a></b>
3865
+
<b><a href="#related-topics">↥ back to top</a></b>
3866
3866
</div>
3867
3867
3868
3868
## Q. Explain the expression `System.out::println`?
3869
3869
3870
3870
The specified expression illustrates passing a reference to a static method of a `println()`class `System.out`.
3871
3871
3872
3872
<divalign="right">
3873
-
<b><a href="#">↥ back to top</a></b>
3873
+
<b><a href="#related-topics">↥ back to top</a></b>
3874
3874
</div>
3875
3875
3876
3876
## Q. What is a Functional Interface?
@@ -3882,7 +3882,7 @@ To accurately determine the interface as functional, an annotation has been adde
3882
3882
An interface can include as many `default` methods as you like while remaining functional, because `default` methods are not abstract.
3883
3883
3884
3884
<divalign="right">
3885
-
<b><a href="#">↥ back to top</a></b>
3885
+
<b><a href="#related-topics">↥ back to top</a></b>
<b><a href="#related-topics">↥ back to top</a></b>
4079
4079
</div>
4080
4080
4081
4081
## Q. What is the difference between `Collection` and `Stream`?
4082
4082
4083
4083
Collections allow you to work with elements separately, while streams do not allow this, but instead provides the ability to perform functions on data as one.
4084
4084
4085
4085
<divalign="right">
4086
-
<b><a href="#">↥ back to top</a></b>
4086
+
<b><a href="#related-topics">↥ back to top</a></b>
4087
4087
</div>
4088
4088
4089
4089
## Q. What is the method `collect()`for streams for?
@@ -4119,7 +4119,7 @@ Collector < String , a List < String > , a List < String > > toList = Collector
4119
4119
```
4120
4120
4121
4121
<divalign="right">
4122
-
<b><a href="#">↥ back to top</a></b>
4122
+
<b><a href="#related-topics">↥ back to top</a></b>
4123
4123
</div>
4124
4124
4125
4125
## Q. Why do streams use `forEach()`and `forEachOrdered()` methods?
@@ -4128,7 +4128,7 @@ Collector < String , a List < String > , a List < String > > toList = Collector
4128
4128
*`forEachOrdered()` applies a function to each stream object while maintaining the order of the elements.
4129
4129
4130
4130
<divalign="right">
4131
-
<b><a href="#">↥ back to top</a></b>
4131
+
<b><a href="#related-topics">↥ back to top</a></b>
4132
4132
</div>
4133
4133
4134
4134
## Q. What are `map()`, `mapToInt()`, `mapToDouble()` and `mapToLong()` methods in Stream?
@@ -4144,23 +4144,23 @@ Stream
4144
4144
```
4145
4145
4146
4146
<divalign="right">
4147
-
<b><a href="#">↥ back to top</a></b>
4147
+
<b><a href="#related-topics">↥ back to top</a></b>
4148
4148
</div>
4149
4149
4150
4150
## Q. What is the purpose of `filter()` method in streams?
4151
4151
4152
4152
The method `filter()` is an intermediate operation receiving a predicate that filters all elements, returning only those that match the condition.
4153
4153
4154
4154
<divalign="right">
4155
-
<b><a href="#">↥ back to top</a></b>
4155
+
<b><a href="#related-topics">↥ back to top</a></b>
4156
4156
</div>
4157
4157
4158
4158
## Q. What is the use of `limit()` method in streams?
4159
4159
4160
4160
The method `limit()`is an intermediate operation, which allows you to limit the selection to a certain number of first elements.
4161
4161
4162
4162
<divalign="right">
4163
-
<b><a href="#">↥ back to top</a></b>
4163
+
<b><a href="#related-topics">↥ back to top</a></b>
4164
4164
</div>
4165
4165
4166
4166
## Q. What is the use of `sorted()` method in streams?
@@ -4170,7 +4170,7 @@ The method `sorted()`is an intermediate operation, which allows you to sort the
4170
4170
The order of the elements in the original collection remains untouched - `sorted()`it just creates its sorted representation.
4171
4171
4172
4172
<divalign="right">
4173
-
<b><a href="#">↥ back to top</a></b>
4173
+
<b><a href="#related-topics">↥ back to top</a></b>
4174
4174
</div>
4175
4175
4176
4176
## Q. What streamers designed methods `flatMap()`, `flatMapToInt()`, `flatMapToDouble()`, `flatMapToLong()`?
@@ -4187,7 +4187,7 @@ Stream
4187
4187
`flatMapToInt()`, `flatMapToDouble()`, `flatMapToLong()`- are analogues `flatMap()`, returns the corresponding numerical stream.
4188
4188
4189
4189
<div align="right">
4190
-
<b><a href="#">↥ back to top</a></b>
4190
+
<b><a href="#related-topics">↥ back to top</a></b>
<b><a href="#related-topics">↥ back to top</a></b>
4320
4320
</div>
4321
4321
4322
4322
## Q. What is LocalDateTime?
4323
4323
4324
4324
`LocalDateTime`combines together `LocaleDate`and `LocalTime`contains the date and time in the calendar system ISO-8601 without reference to the time zone. Time is stored accurate to the nanosecond. It contains many convenient methods such as plusMinutes, plusHours, isAfter, toSecondOfDay, etc.
4325
4325
4326
4326
<div align="right">
4327
-
<b><a href="#">↥ back to top</a></b>
4327
+
<b><a href="#related-topics">↥ back to top</a></b>
4328
4328
</div>
4329
4329
4330
4330
## Q. What is ZonedDateTime?
4331
4331
4332
4332
`java.time.ZonedDateTime`- an analogue `java.util.Calendar`, a classwith the most complete amount of information about the temporary context in the calendar system ISO-8601. It includes a time zone, therefore, this classcarries out all operations with time shifts taking into account it.
4333
4333
4334
4334
<div align="right">
4335
-
<b><a href="#">↥ back to top</a></b>
4335
+
<b><a href="#related-topics">↥ back to top</a></b>
4336
4336
</div>
4337
4337
4338
4338
## Q. How to determine repeatable annotation?
@@ -4351,23 +4351,23 @@ To define a repeatable annotation, you must create a container annotation for th
4351
4351
```
4352
4352
4353
4353
<div align="right">
4354
-
<b><a href="#">↥ back to top</a></b>
4354
+
<b><a href="#related-topics">↥ back to top</a></b>
4355
4355
</div>
4356
4356
4357
4357
## Q. What is Nashorn?
4358
4358
4359
4359
**Nashorn** is a JavaScript engine developed in Java by Oracle. Designed to provide the ability to embed JavaScript code in Java applications. Compared to Rhino , which is supported by the MozillaFoundation, Nashorn provides 2 to 10 times better performance, as it compiles code and transfers bytecode to the Java virtual machine directly in memory. Nashorn can compile JavaScript code and generate Java classes that are loaded with a special loader. It is also possible to call Java code directly from JavaScript.
4360
4360
4361
4361
<div align="right">
4362
-
<b><a href="#">↥ back to top</a></b>
4362
+
<b><a href="#related-topics">↥ back to top</a></b>
4363
4363
</div>
4364
4364
4365
4365
## Q. What is jjs?
4366
4366
4367
4367
`jjs` -This is a command line utility that allows you to execute JavaScript programs directly in the console.
4368
4368
4369
4369
<div align="right">
4370
-
<b><a href="#">↥ back to top</a></b>
4370
+
<b><a href="#related-topics">↥ back to top</a></b>
4371
4371
</div>
4372
4372
4373
4373
## Q. What classappeared in Java 8 for encoding / decoding data?
0 commit comments