0% found this document useful (0 votes)
8 views

Java-1 0

Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Java-1 0

Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 9

Java – University program

Author: GTN Document type: Self-training roadmap

Review: QVR

Date: 22.05.2023

Version: 1.0

Self-Training for Java


Table of contents
1. Introduction...........................................................................................................................2
2. Glossary..............................................................................................................................2
3. Training plan.......................................................................................................................3

© ELCA Information Technology (Vietnam) Ltd. 2008 Self-training roadmap V 1.0/23.07.08/RJB/Valid 1 / 9


1. Introduction
“The JavaTM programming language is designed to meet the challenges of application development in the context of heterogeneous, network-
wide distributed environments. Paramount among these challenges is secure delivery of applications that consume the minimum of system
resources, can run on any hardware and software platform, and can be extended dynamically.”1
This document is a roadmap to learn Java language based on JDK8. After going through this roadmap step-by-step, readers are expected to
have a good background about the Java programming language that help them start working with more advanced Java topics of real Java
projects in ELCA. Java 8 is recommended to use as standard in ELCA for the later projects.

2. Glossary

Term Description
OOP Object-oriented programming
JRE Java Runtime Environment
JDK Java Development Kit
Java SE Java Standard Edition
Java EE Java Enterprise Edition

© ELCA Information Technology (Vietnam) Ltd. 2008 Self-training roadmap V 1.0/23.07.08/RJB/Valid 2 / 9


3. Training plan

No. Type2 Task Description Estimated


Time (h)
1 S Set-up environment Follow the instructions below to setup the environment used for this training:

- Install JDK8: Download and install latest Oracle’s implementation of


JDK8 here: https://adoptium.net/temurin/releases/?version=8. NOTE: It
should be installed onto a directory whose path has no “space character”,
for instance: c:\java\ jdk1.8.0_05.

- Install the version Ultimate of Intellij IDE:


https://www.jetbrains.com/idea/download

2 R Get an overview about Java To get an overview of Java language, read the following topics: About the Java 0.5
programming language and Technology and What can Java Technology can do. These topics are listed on
understand some basic the webpage: http://docs.oracle.com/javase/tutorial/getStarted/intro/index.html
terminologies
Read this page (DON’T follow any link in these pages):
http://www.oracle.com/technetwork/java/javase/tech/index.html in order to know:

- What’s Java SE/JRE/JDK?

- To get an overview about components/technologies of Java SE

3 R Understand the collections in Java Follow this page 1


and know the difference among https://docs.oracle.com/javase/tutorial/collections/interfaces/index.html to know
them the implementation of some collections. Please focus on List, Set and Map.

Understand the differences among the collections and when to use them.

4 R Understand Enhancements in The new APIs relate to Java I/O called NIO.2 are introduced. Please follow the 0.5
Java NIO.2 step by step instructions in
http://docs.oracle.com/javase/tutorial/essential/io/fileio.html to understand and

2
R = Reading, E = Exercise, C = Checkpoint, S = Setup, P = Presentation

© ELCA Information Technology (Vietnam) Ltd. 2008 Self-training roadmap V 1.0/23.07.08/RJB/Valid 3 / 9


No. Type Task Description Estimated
Time (h)
able to use new classes and methods.

After this tutorial, trainee should know:

- The Path class and Path Operations

- File Operations

- Checking, deleting, copying, moving file or directory

- Managing metadata (File and file store attributes)

- Reading, writing, creating file or directory

- Random access, finding file and walking the File Tree

- Watching a Directory for Changes

Asynchronous I/O (future and callback style) in


http://www.ibm.com/developerworks/java/library/j-nio2-1/index.html

5 R Understand how to use Lambda Lambda expressions enable the possiblity to pass functionality as an argument 1
expression and default methods to another method, therefore treat functionality as method argument, or code as
data. Study it from the following link:
http://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html.

Default methods allow adding new functionality to existing interfaces while


ensuring binary compatibility with code written for older versions of those
interfaces. Study it here:
http://docs.oracle.com/javase/tutorial/java/IandI/defaultmethods.html.

Also read the below discussion about how to choose between nested classes,
local classes, anonymous classes and Lambda Expressions:
http://docs.oracle.com/javase/tutorial/java/javaOO/whentouse.html.

© ELCA Information Technology (Vietnam) Ltd. 2008 Self-training roadmap V 1.0/23.07.08/RJB/Valid 4 / 9


No. Type Task Description Estimated
Time (h)
6 R Understand how to use method Method references enable the possibility to refer to an existing method by name. 1
references This is useful in many cases, especially when a lambda expression does nothing
but invoking an existing method. Study it from the following link:
http://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html.

7 R Understand how to perform Study how to perform aggregate operations on a collection here: 2
aggregate operations on collection http://docs.oracle.com/javase/tutorial/collections/streams/index.html and also
in Java 8 extend the studying with “Reduction” topic (please omit “Parallelism” for the
moment, it contains advanced stuffs and can be used as source for further
reading later):
http://docs.oracle.com/javase/tutorial/collections/streams/reduction.html.

After studying, the trainee should be able to answer the following questions:

- What is pipeline? How many components does it have?

- What is the important diferrence between an intermediate operation and


a terminal operation?

- What are the fundamental difference between the 2 kinds of reduction:


Stream.reduce and Stream.collect?

- How are the 2 arguments used in the following reduce API:


java.util.stream.IntStream.reduce(int, IntBinaryOperator)?

- How are the 3 arguments used in the following collect API:


java.util.stream.Stream.collect(Supplier<R>,
BiConsumer<R, ? super T>, BiConsumer<R, R>)?

8 R Understand how to use the Date- Read the introduction about what Date-Time API is, its design principles, 0.5
Time API in Java 8 important packages and method naming conventions here:
http://docs.oracle.com/javase/tutorial/datetime/overview/index.html.

Then, continue by carefully studying the lessions concerning the Standard

© ELCA Information Technology (Vietnam) Ltd. 2008 Self-training roadmap V 1.0/23.07.08/RJB/Valid 5 / 9


No. Type Task Description Estimated
Time (h)
Calendar listed below:

- http://docs.oracle.com/javase/tutorial/datetime/iso/overview.html

- http://docs.oracle.com/javase/tutorial/datetime/iso/enum.html

- http://docs.oracle.com/javase/tutorial/datetime/iso/date.html

- http://docs.oracle.com/javase/tutorial/datetime/iso/datetime.html

- http://docs.oracle.com/javase/tutorial/datetime/iso/timezones.html

- http://docs.oracle.com/javase/tutorial/datetime/iso/format.html

9 R Understand the various There is a notable update in utility functions which replace many usage of third 0.5
miscellaneous additions to party libraries. Whenever possible, it is strongly recommended to use platform
java.lang, java.util … libraries instead of third parties.

Please read about them here:


http://www.techempower.com/blog/2013/03/26/everything-about-java-8/
(sections “Collections API additions” and “Other miscellaneous additions to
java.lang, java.util, and elsewhere”).

Some other third party utilities that are frequently used are from

https://commons.apache.org/

Such as StringUtils, CollectionUtils. Please read about them:

https://commons.apache.org/proper/commons-collections/apidocs/org/apache/
commons/collections4/CollectionUtils.html

https://commons.apache.org/proper/commons-lang/apidocs/org/apache/
commons/lang3/StringUtils.html

© ELCA Information Technology (Vietnam) Ltd. 2008 Self-training roadmap V 1.0/23.07.08/RJB/Valid 6 / 9


No. Type Task Description Estimated
Time (h)
10 C Check Coach ensures that trainee understands the following knowledge: -

 OOP principles

 Boxed and primitive data type, how are they different from each other?

 In Java, how do we compare 2 objects to check if they are the equal?

 What are the fundamental differences among Set, List and Map?

 Best practices to handle string concatenation

 What types of lambda expressions are used in Stream api? Give


examples

 How many kinds of method references provided by Java 8?

 What is a functional interface? Why it is important to enable the usage of


Lambda expressions?

 How standard functional interfaces simplify the usage of Lambda


expressions?

 What are purposes of the following standard functional interfaces and


how they are used with Lambda expressions:

o java.util.function.Predicate

o java.util.function.Function

o java.util.function.Consumer

o java.util.function.Supplier

© ELCA Information Technology (Vietnam) Ltd. 2008 Self-training roadmap V 1.0/23.07.08/RJB/Valid 7 / 9


No. Type Task Description Estimated
Time (h)
 Can a Lambda expression shadow a variable that existed in the
enclosing scope?

 Which data is stored inside a LocalDateTime? What other information is


required in order for LocalDateTime to present a correct value?

 How does Java garbage collector work? When does it run?

11 E Exercises We have a file named companies.csv with the structure as following: 8

User interface is not necessary, you need to write a program to provide the
following features:
1. Import the file. Please note that the application can be extended in
the future to support more file extensions (e.g: XML, XLSX, …).

2. Output to the console the total capital of headquarters located in


“CH”.

3. Output to the console the name of companies that the country is in


“CH”. The list is sorted descending by capital.

4. Modify your program to monitor a predefined folder “import” for


changes. If your program is able to process the file, reimport the file
and print out the results in feature #2 and #3.

5. Use your program to re-import the following zip file


(companies_big_data.zip). Unzip the file with Windows before
importing, your program only needs to handle csv file for now.

© ELCA Information Technology (Vietnam) Ltd. 2008 Self-training roadmap V 1.0/23.07.08/RJB/Valid 8 / 9


No. Type Task Description Estimated
Time (h)

Suggested design patterns: Template method, Factory, Singleton, State, Observer.

After finishing your program, your trainer can check with you about:

- The way you applied resource management (e.g: read file) and exception
handling.

- The data structure (object, class, interface) has been used in your code.

- How is Lambda expression used in your code to facilitate the aggregation


calculation?

- How did you prepare for the new file extensions that might come in the
future?

- How many design patterns did you use in the implementation?

- How did you improve your program so that the big file can be imported
without any memory issue? If your program worked without any changes,
can you explain why?

12 C Coach validation Present/discuss with coach your answers for all previous questions and the -
exercises as well.

© ELCA Information Technology (Vietnam) Ltd. 2008 Self-training roadmap V 1.0/23.07.08/RJB/Valid 9 / 9

You might also like