Lecture 15: Final Remarks
Assignment stream() problem statement
The following names appear in a list: Enos, Mahalaleel, Adam, Seth, Cainan.
Implement the stream() method to sort and print these names in alphabetical order.
Assignment stream() solution
import java.util.List;
List<String> names = List.of("Enos", "Mahalaleel", "Adam", "Seth", "Cainan");
names.stream().sorted().forEach(n -> System.out.print(n + " "));
Assignment stream() output
Adam Cainan Enos Mahalaleel Seth
Hi, there, I am Marius from AlefTav Coding with the last tutorial of my course, Java, The Basics. In this blog I will give you an assignment and make some final remarks.
The assignment reads, The following names appear in a list: Enos, Mahalaleel, Adam, Seth, Cainan. Implement the stream() method to sort and print these names in alphabetical order.
I am not going to provide you with starting code. If you worked through the course material you should have enough background information to complete this task.
Java, and programming in general, is hard work. To be successful, you need to have a can-do attitude. I believe anyone can do Java programming, provided they are prepared to put in the effort. Because, essentially it is just a skill that can be learnt. This is proven by the current 12 million professional Java developers that are working around the world in every conceivalbe industry.
Also, there is a big shortage of Java developers, and the demand for them is increasing rapidly. Java developers are among the best-paid professionals, not just in software, but compared to other highly-paid jobs.
So, if you sense that this is the type of work you enjoy doing, I suggest you make a go of it.
I am Marius from AlefTav Coding. I look forward to working again with you in a future course, and, as always KEEP CODING.
Please upvote, subscribe, like and share. You can find me at the following links.
https://www.udemy.com/course/1435298/manage/basics/
https://d.tube/#!/c/mariusclaassen
https://steemit.com/@mariusclaassen