Skip to content

Commit 7f70a33

Browse files
committed
Thank You for Choosing to Learn from in28Minutes
1 parent a2442be commit 7f70a33

3 files changed

Lines changed: 212 additions & 215 deletions

File tree

file.txt

Lines changed: 0 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -1,159 +1,3 @@
11
Some Text
22
Some Text that will be saved
33
A lot of Text Present in here
4-
5-
Extra texts from readme.md file
6-
7-
### Commands Executed during the course
8-
9-
```
10-
System.out.println("Ranga")
11-
List<Integer> numbers = List.of(12, 9, 13, 4, 6, 2, 4, 12, 15);
12-
numbers.stream().reduce(0, (x,y)->x+y)
13-
numbers.stream().reduce(0, (x,y)->x)
14-
numbers.stream().reduce(0, (x,y)->y)
15-
numbers.stream().reduce(0, (x,y)-> x>y ? x:y)
16-
numbers.stream().reduce(Integer.MIN_VALUE, (x,y)-> x>y ? x:y)
17-
numbers.stream().reduce(Integer.MIN_VALUE, (x,y)-> x>y ? y:x)
18-
numbers.stream().reduce(Integer.MAX_VALUE, (x,y)-> x>y ? y:x)
19-
numbers
20-
numbers
21-
numbers.stream().reduce(0, (x,y) -> x*x + y*y)
22-
numbers.stream().map(x -> x*x).reduce(0, Integer::sum)
23-
numbers.stream().map(x -> x*x*x).reduce(0, Integer::sum)
24-
numbers.stream().filter(x -> x%2==1).reduce(0, Integer::sum)
25-
numbers.stream().filter(x -> x%2==0).reduce(0, Integer::sum)
26-
numbers.stream().distinct().forEach(System.out::println)
27-
numbers
28-
numbers.stream().sorted().forEach(System.out::println)
29-
numbers.stream().distinct().sorted().forEach(System.out::println)
30-
List<String> courses = List.of("Spring", "Spring Boot", "API" , "Microservices","AWS", "PCF","Azure", "Docker", "Kubernetes");
31-
courses
32-
courses.stream().sorted().forEach(System.out::println)
33-
courses
34-
courses.stream().sorted().forEach(System.out::println)
35-
courses.stream().sorted(Comparator.naturalOrder()).forEach(System.out::println)
36-
courses.stream().sorted(Comparator.reverseOrder()).forEach(System.out::println)
37-
courses.stream().sorted(Comparator.comparing(str -> str.length())).forEach(System.out::println)
38-
numbers
39-
courses
40-
courses.stream().map(x -> x.length()).collect(Collectors.toList())
41-
numbers.stream().map(x -> x*x).collect(Collectors.toList())
42-
Supplier<String> supplier = () -> {return "Ranga";};
43-
Consumer<String> consumer = (str) -> { System.out.println(str);System.out.println(str);};
44-
45-
46-
numbers.stream()
47-
List<Integer> numbers = List.of(12, 9, 13, 4, 6, 2, 4, 12, 15);
48-
numbers.stream()
49-
Stream.of(12, 9, 13, 4, 6, 2, 4, 12, 15).count()
50-
Stream.of(12, 9, 13, 4, 6, 2, 4, 12, 15).reduce(0, Integer::sum)
51-
Stream.of(12, 9, 13, 4, 6, 2, 4, 12, 15)
52-
int[] numberArray = {12, 9, 13, 4, 6, 2, 4, 12, 15};
53-
Arrays.stream(numberArray)
54-
Arrays.stream(numberArray).sum()
55-
Arrays.stream(numberArray).average()
56-
Arrays.stream(numberArray).min()
57-
Arrays.stream(numberArray).max()
58-
IntStream.range(1,10)
59-
IntStream.range(1,10).sum()
60-
IntStream.rangeClosed(1,10).sum()
61-
IntStream.iterate(1, e -> e + 2).limit(10).sum()
62-
IntStream.iterate(1, e -> e + 2).limit(10).peek(System.out::println).sum()
63-
IntStream.iterate(2, e -> e + 2).limit(10).peek(System.out::println).sum()
64-
IntStream.iterate(2, e -> e * 2).limit(10).peek(System.out::println).sum()
65-
IntStream.iterate(2, e -> e * 2).limit(10).boxed().collect(Collectors.toList())
66-
Integer.MAX_VALUE
67-
Long.MAX_VALUE
68-
IntStream.rangeClosed(1,50).reduce(1, (x,y)->x*y)
69-
LongStream.rangeClosed(1,50).reduce(1, (x,y)->x*y)
70-
LongStream.rangeClosed(1,50).reduce(1L, (x,y)->x*y)
71-
LongStream.rangeClosed(1,10).reduce(1, (x,y)->x*y)
72-
LongStream.rangeClosed(1,20).reduce(1, (x,y)->x*y)
73-
LongStream.rangeClosed(1,40).reduce(1, (x,y)->x*y)
74-
LongStream.rangeClosed(1,50).mapToObj(BigInteger::valueOf).reduce(BigInteger.ONE, BigInteger::multiply)
75-
76-
courses.stream().collect(Collectors.joining(" "))
77-
courses.stream().collect(Collectors.joining(","))
78-
"Spring".split("")
79-
courses.stream().map(course -> course.split("")).collect(Collectors.toList())
80-
courses.stream().map(course -> course.split(""))
81-
courses.stream().map(course -> course.split("")).flatMap(Arrays::stream).collect(Collectors.toList())
82-
courses.stream().map(course -> course.split("")).flatMap(Arrays::stream).distinct().collect(Collectors.toList())
83-
List<String> courses = List.of("Spring", "Spring Boot", "API" , "Microservices","AWS", "PCF","Azure", "Docker", "Kubernetes");
84-
List<String> courses2 = List.of("Spring", "Spring Boot", "API" , "Microservices","AWS", "PCF","Azure", "Docker", "Kubernetes");
85-
courses.stream().flatMap(course -> courses2.stream().map(course2 -> List.of(course,course2))).collect(Collectors.toList())
86-
courses.stream().flatMap(course -> courses2.stream().map(course2 -> List.of(course,course2))).filter(list -> list.get(0).equals(list.get(1))).collect(Collectors.toList())
87-
courses.stream().flatMap(course -> courses2.stream().map(course2 -> List.of(course,course2))).filter(list -> !list.get(0).equals(list.get(1))).collect(Collectors.toList())
88-
courses.stream().flatMap(course -> courses2.stream().filter(course2 -> course2.length()==course.length()).map(course2 -> List.of(course,course2))).filter(list -> !list.get(0).equals(list.get(1))).collect(Collectors.toList())
89-
courses.stream().filter(courses -> courses.length()>11).map(String::toUpperCase).findFirst()
90-
courses.stream().peek(System.out::println).filter(courses -> courses.length()>11).map(String::toUpperCase).peek(System.out::println).findFirst()
91-
courses.stream().peek(System.out::println).filter(courses -> courses.length()>11).map(String::toUpperCase).peek(System.out::println)
92-
$4.findFirst()
93-
List<String> courses = List.of("Spring", "Spring Boot", "API" , "Microservices","AWS", "PCF","Azure", "Docker", "Kubernetes");
94-
courses.replaceAll( str -> str.toUpperCase())
95-
List<String> modifyableCourses = new ArrayList(courses);
96-
modifyableCourses.replaceAll(str -> str.toUpperCase())
97-
modifyableCourses
98-
modifyableCourses.removeIf(course -> course.length()<6)
99-
modifyableCourses
100-
101-
```
102-
103-
## Next Steps
104-
105-
## Todo
106-
- Course Promotion Emails/Posts
107-
- 2 Emails on Udemy
108-
- 2 Emails to Email List
109-
- Create YouTube Course Preview Video
110-
- Add YouTube Course Preview Video as End Video for all videos
111-
- Make it the YouTube Default Video
112-
- Release atleast 20 small videos - one a day on Youtube
113-
- Do atleast 3 Youtube live sessions
114-
- After a Month
115-
- UFB and Packt
116-
117-
118-
119-
### Later
120-
121-
- Creating a Custom Functional Interface and Creating a Lambda Expression matching it!
122-
- Clarify on Passing Behavior as a Parameter.
123-
- Collectors.toMap(key, value)
124-
- What are the constraints in using parallel() on the Streams?
125-
126-
- collect(ArrayList::new, ArrayList::add, ArrayList::addAll)
127-
- partitioningBy
128-
129-
Behavior Parameterization
130-
-> Tracing Performance of methods -> Pass function to track as a parameter
131-
-> Externalize Sort Behavior as a parameter
132-
133-
Function Composition
134-
- Function<String, Integer> lengthBis = unNullify.andThen(length);
135-
- Function<String, Integer> lengthBis = length.compose(unNullify);
136-
Consumer.andThen
137-
- Predicate<String> startsWithJAndLengthIs7 = startsWithJ.and(lengthIs7);
138-
- Predicate<String> lengthIs9orError = lengthIs9.or(equalsError);
139-
140-
Design Patterns
141-
- Decorator Pattern
142-
- Template Method - Execute Around Pattern
143-
- Strategy Pattern - Even/Odd/Prime
144-
145-
Play based on Position:
146-
- IntStream.range(0, input.size()).filter(pos -> input.get(pos).length() > pos).mapToObj(pos -> input.get(pos)).collect(Collectors.toList());
147-
148-
Lambda Expressions in Unit Tests => assertThrows
149-
150-
Currying f(x,y) = (g(x))(y)
151-
- int function(BiFunction<Integer,Integer,Integer> func, Integer value1, Integer value2) { return func.apply(value1,value2); }
152-
- function((x,y) -> x + y, 2, 3)
153-
- BiFunction<Integer, Integer, Integer> curry(BiFunction<Integer,Integer,Integer> func) { return (x,y) -> func.apply(x,y); }
154-
- BiFunction<Integer, Integer, Integer> add = curry( (x,y) -> x+y)
155-
add.apply(1,2)
156-
157-
Map Operations
158-
- keys.forEach(key -> map.compute(key, (k, v) -> v == null ? k : v.toUpperCase()));
159-
- map.computeIfAbsent,Present,merge,putIfAbsent, computeIfPresent

notes-java.md

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,3 @@
1-
# Functional Programming with Java
2-
3-
## Learn Functional Programming with Java using a Hands-on Step by Step Approach
4-
5-
Wanna start playing with Functional Programming? Want to write awesome Java code with Functional Programming using Streams, Lambda Expressions, Functional Interfaces and Method References? Want to make your Java Programs more performant and parallelizable using Functional Programming?
6-
7-
Functional Programming is an essential skill for Java Programmers today.
8-
9-
Are you ready to learn about Functional Programming and take the next step in your programming career?
10-
11-
Do you want to join 300,000+ learners having Amazing Learning Experiences with in28Minutes?
12-
13-
Look No Further!
14-
15-
#### Required Tools
16-
- Java 9+
17-
- Eclipse - Oxygen+ - (Embedded Maven From Eclipse)
18-
19-
#### Installing Guides
20-
- [Playlist - Installing Java, Eclipse & Embedded Maven](https://www.youtube.com/playlist?list=PLBBog2r6uMCSmMVTW_QmDLyASBvovyAO3)
21-
22-
#### Troubleshooting Installations
23-
- Eclipse and Embedded Maven
24-
- Troubleshooting Guide - https://github.com/in28minutes/in28minutes-initiatives/tree/master/The-in28Minutes-TroubleshootingGuide-And-FAQ#tip--troubleshooting-embedded-maven-in-eclipse
25-
- PDF - https://github.com/in28minutes/SpringIn28Minutes/blob/master/InstallationGuide-JavaEclipseAndMaven_v2.pdf
26-
- GIT Repository For Installation - https://github.com/in28minutes/getting-started-in-5-steps
27-
28-
## Course Overview
29-
30-
Functional Programming was introduced into Java in Java 8. Additional Functional Programming Enhancements were introduced in Java 9.
31-
32-
In this handson course, we will learn to write awesome Java code with Functional Programming. You will learn the basics of Functional Programming - Lambda Expressions, Method References, Streams and Functional Interfaces.
33-
34-
This course would be a perfect first step as an introduction to Functional Programming.
35-
36-
You will be using using Eclipse (Java IDE) and Java 9 in this course. We will help you set up each one of these.
37-
38-
## What you'll learn
39-
- You will learn to write great Java code with Functional Programming
40-
- You will solve a number of Java Puzzles and Exerices using Functional Programming
41-
- You will learn the Fundamentals of Functional Programming - Lambda Expressions, Method References, Streams and Functional Interfaces
42-
- You will learn about intermediate and terminal Stream operations - map, reduce, forEach, filter, distinct, sorted
43-
- You will learn to simplify your Java code to play with List and Map using Functional Programming
44-
- You will learn about a variety of Functional Interfaces - Predicate, Consumer, Supplier, BinaryOperator and Function
45-
- You will learn to play with Java Files and Threads using Functional Programming
46-
- You will learn some fundamentals of Functional Programming - Behavior Parameterization and Higher Order Functions
47-
- You will Join 300,000 Learners having AMAZING LEARNING Experiences with in28Minutes
48-
49-
## Requirements
50-
- You have an attitude to learn while having fun :)
51-
- You have some programming experience with Java
52-
- You DO NOT need to have any experience with Functional Programming
53-
- We will help you install Eclipse and Java
54-
55-
## Who is this course for
56-
- You are a Java Developer wanting to learn about Functional Programming
57-
- You are a Java Developer and would like to discover a new approach to parallelizing your code
58-
591
## Table of Contents
602

613
### Introduction to the Course

0 commit comments

Comments
 (0)