Skip to content

Commit 8542652

Browse files
committed
Review Comments Fixed
1 parent 185e5d1 commit 8542652

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

Funtional/src/Functional01.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public static void main(String[] args) {
2828
printallinSortedNaturalandReverseOrder(List.of(10,8,6,7,4,3,2,1,9,5));
2929
//using sorted method with comparater.comparing() for Strings
3030
sortallStringaccording(List.of("Spring", "SpringBoot", "AWS", "Microservices, Java"));
31+
// print and Display numbers in a List
32+
printANDDisplayNumbers(List.of(1, 2, 3, 4, 5, 6));
3133

3234
List<Integer> doubleListofNums = doubleList(List.of(1, 2, 3, 4, 5));// uses collect(Collectors.toList()) method
3335
doubleListofNums.stream().forEach(System.out::println);
@@ -38,6 +40,7 @@ public static void main(String[] args) {
3840

3941
Funtional_Code functFuntionalCode = new Funtional_Code();
4042
functFuntionalCode.printAllDuplicatesInList(List.of(10,20,10,30,40,30,50,80,80,80,100));
43+
4144
}
4245

4346
private static void sortallStringaccording(List<String> courses) {
@@ -182,9 +185,8 @@ private static void printOddNumbers(List<Integer>integers){
182185
}
183186

184187
private static void printANDDisplayNumbers(List<Integer>integers){
185-
System.out.println("Odd numbers");
188+
System.out.println("Numbers Lists");
186189
integers.stream()
187-
.filter(number -> (number % 2) != 0)
188190
.forEach(System.out::println);
189191
}
190192
}

Funtional/src/Problems.java

-5
This file was deleted.
216 Bytes
Binary file not shown.
-249 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)