0% found this document useful (0 votes)
5 views118 pages

Schedule

The document outlines key Java programming concepts including data types, operators, control flow, object-oriented principles, exception handling, and JDBC for database applications. It covers topics such as arithmetic operations, string manipulation, class structures, encapsulation, inheritance, interfaces, and error handling mechanisms. Additionally, it provides details on executing SQL statements and using prepared statements in JDBC.

Uploaded by

nghia250803
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views118 pages

Schedule

The document outlines key Java programming concepts including data types, operators, control flow, object-oriented principles, exception handling, and JDBC for database applications. It covers topics such as arithmetic operations, string manipulation, class structures, encapsulation, inheritance, interfaces, and error handling mechanisms. Additionally, it provides details on executing SQL statements and using prepared statements in JDBC.

Uploaded by

nghia250803
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 118

Ww18 week to practice: 17/2/2025-17/4/2025

1. Working with Java data types (10%)


1.1 Operator, casting, unboxing-
autoboxing
1.1.1 Arithmetic Operators
- integer / 0 =exception, floating / 0 = infinite
-Operands of mathematical operators are at least int
and return value is at least int
-Compound assignment expression:
E1 op E2 -> E1 = (Type of E1) (E1 op E2)
s += i -> s = (type of s)(s + i)
1.1.2 Conversions between Numeric
Types

1.1.3 Casts

1.1.7 Relational and boolean Operators


- ==, !=, <, &&, ||..
+&&,||: short circuit

-The ternary ?:
1.1.8 Bitwise Operators

Note: ~ N = -(N+1) ; N ^ ~N =-1


1.1.9 Wrapper
Byte/Short/Integer/Long/Float/Double/Character/
Boolean:
-Byte, Character, Short, Integer values from -128->127
-<primitive>value(): return primitive
Wrapper.parse<Wrapper>: return primitive
Wrapper.valueOf(number/String): return Wrapper
Wrapper.get<Wrapper>(String): return Wrapper
Integer.getInteger(“5”)…
-Autoboxing:
Byte,Short,Integer to int, Character to character,int
Long to long (1L…), Float to float (1.0f), Double to
double(1.0)
-Unbox: Same like autocast in primitive
1.1.10 Parentheses and Operator
Hierarchy

1.2 String-StringBuilder
1.2.1 String
-Final class
-Constructor: (), byte[], char[], String, StringBuilder
- Static methods: join, valueOf, format
-Instance methods: charAt, concat, contains, startsWith,
endsWith, equals, equalIgnoreCase, indexOf, indent,
isBlank, isEmpty, lastIndexOf, length, repeat, replace,
replaceAll, replaceFirst, split, strip, stripIndent,
stripLeading, stripTrailing, subString, toLowerCase,
toUpperCase, trim
-Escape character:\ and Escape Sequence:
\t Insert a tab in the text at this point.
\b Insert a backspace in the text at this point.
\n Insert a newline in the text at this point.
\r Insert a carriage return in the text at this point.
\f Insert a form feed in the text at this point.

\' Insert a single quote character in the text at this


point.

\" Insert a double quote character in the text at this


point.

\\ Insert a backslash character in the text at this


point.

-Java maintain pool of string=literal strings + string-


valued constant expresses (example: “a”+”b”) ->
1.2.2 StringBuilder
-Constructor: (), String
-Instance methods: append, capacity, charAt, delete,
deleteCharAt, indexOf, lastIdexOf, insert, length(),
replace, reverse, subString
1.2.3 Text block

-Delimeter “””
+The starting delimiter is """ followed by any number of
white spaces followed by the ASCII LF character (i.e. the
new line character).
+The ending delimiter is """.
-Trailing white space:Incidental white space + essential
white space
+Incidental whitespace: whitespace before closing “””
+Essential whitespace: whitespace after starting “””
1.3 Typer inference with var
-var is not a keyword, can use var as variable name
-Var can use in:
+static/instance initialization block
+as a local variable
+iteration variable in enhanced for-loop
+as looping index in for-loop
+as a return value from another method,
+as a return value in a method,
1.4 Controlling Program Flow (5%)
-break: exit a switch and break out of a loop.
-label: can use to code block or block level statement
(for…) but not to declaration
-continue: transfer control to the header of innermost
enclosing loop
-Note: labeled break or continue statement must always
exist inside the loop where the label is declared
-Don’t use keyword for label.
1.5 if/else, swith-case, loops
1.5.1 Switch
-works with: byte, short, char, int+ their wrap+
enumarted+String
-case label must fit into switch selector
-Switch statement
-Switch expression
+”case L->: Labels:

+”case L:” Statements and yield Statement


-Note:
+The default label is optional for switch statement and
required for a switch expression only when the case
labels are not exhaustive.
+Can’t mix switch expression+statement
1.5.2 If-else
-An else clause belongs to the innermost if the first if()
condition fails+there is no else associated to execute
1.3.3 while, dowhile
-Don’t use: while(false)->unreachable code
1.6 Instanceof
-Pattern matching for instanceof: remove the conversion
step: change 2nd operand with a type pattern

-Scope:
+place where it’s true

+Extend beyond the statement:


+Use in the expression of if statement: &&

1.7 Garbage Collection


-System.gc() or Runtime.getRunTime().gc() wont run the
garbage collector.
-All object null
2. Java Object-Oriented (30%)
2.1 Class-objects declaration,
initialization, life cycles
-Default field Initialization:
If you don’t set a field explicitly in a constructor, it is
automatically set to a default value: numbers to 0,
boolean to false, object reference to null.
-Constructor with no Arguments:
+Constructor with no arguments: creates an object
whose state is set to an appropriate default.
+If a class with no constructors: a no-argument
constructor is provided with all default values fields and
with class access modifier
-Explicit Field Initialization:
You can simply assign a value to any field in class
definition. This assignment is carried out before the
constructor executes.

-Initialization Blocks:

-Constructor flow
+ the class is loaded: static field initializer + static
initialization block in order in class
+ If having second constructor in constructor ->Call it
+ Otherwise:
default values
instance fields initializers+ instance initialization block in
the order in class declaration
The body of constructor.
-Note:
+Can name constructor’s name to any method
2.2 Fields, methods with instance, static,
overloading
-Method parameters can have at most one vararg and it
must appear as the last argument.
-Overloading: several methods have the same name but
different parameters and (maybe)different return types.
-final fields: must be assigned in instance initializer or all
constructor
-Choose method for overloading:
Class -> boxing-unboxing
2.3 Nested class, inner class, local class,
anonymous class
-Nested class = Inner class + Static nested class
2.3.1 Nested Class
-Nested Class: Class inside class
-Inner Class: Non-Static Nested Class
+Member inner class, local inner class, anonymous class
-Can have all access modifier + seal
-Can have static methods+ final static fields
-method gets to access both its own data fields and
outer object -> outer object can exist many instances of
inner class.
2.3.2 Syntax rules
-OuterClass.this denotes the outer class reference
+OuterClass1st.OuterClass2nd.this just refer to
OuterClass2nd object.
-Method:

-Inner object constructor more explicitly:

+objectOuter.new InnerClass()
+new OuterClass.InnerClass()
+new OuterClass().new InnerClass()
-Refer to Inner class when it occurs outside the scope of
outer class:
2.3.3 Local inner classes
-Local classes are not declared with access specifier.
Their scope is restricted to the block they’re declared
-hidden from the outside
- can access final local variables + like nested class
2.3.4 Anonymous Inner Classes

-General syntax:

+can be an interface, class


-class can’t have constructors, given to superclass
constructor.
-When an inner class implements interface:
-Different:

-Note: You can provide object initialization block

-Anonymous class can used in static method.


2.3.5 Static Nested Classes
doesn’t have a reference to the outer class object
-Can be class or interface
-Contain non-static and static member variables
-Class in interface ->static
2.4 Encapsulation and immutability
-Encapsulation(information hiding): classes expose only
certain fields + methods to other classes for access.
-A good encapsulate class: has private instance variable +
accessed by public method.
-Immutability: prevent variable state from changing
+no mutator methods + final class
2.5 Subclass, super class, abstract class
-Moving up the inheritance hierarch, classes become
more general and abstract. There are some attributes
that make sense for every class. Using the abstract, you
don’t need to implement the method:

-Abstract methods act as placeholders for method that


are implemented in subclasses. It can has instance fields
+constructor+ concrete methods, or no abstract
method.
-Abstract cannot be instantiated, you can create object
variable but refer a nonabstract class. The variable
always refers to an object of subclass.

-Abstract methods are an important concept in Java =>


inside interfaces.
-Almost classes can be declared abstract except
Anonymous class because it has no class name.
2.6 Method call polymorphically
- Instance method depends on the type of actual object.
Static method and instance fields depend on the
variable type.
-Check whether we can use this method: check the type
reference.
-super and this:
+Can’t use both
+super(); is automatically added if the sub class
constructor doesn't call any of the super class's
constructors.
+If a subclass does not have any declared constructors,
the implicit default constructor of the subclass will have
a call to super( )
-Override: an overriding method can be made less
restrictive (public->protected->default->private)
+Override methods can declare new unchecked
exceptions
-Override instance method: be careful to conflict with
static method of this and super class.
-Steps to check for valid override
First, check the method signature the parameter list
Second: generic type specification must the same
For example, if the overridden method has Set<Integer>,
then the overriding method can Set<Integer>. But if
overridden method has Set, then the overriding method
must also have Set for a valid override.
Third: "covariant" returns (for example, ArrayList is
covariant with List), + covariant generic type
specification (for example, ArrayList<CharSequence> is
covariant with List<? extends CharSequence>).

Rule of Covariant Returns


Assuming that S is a sub type of T and <<< means "is a
subtype of", here are the two hierarchies:
Hierarchy 1 : A<S> <<< A<? extends S> <<< A<? extends
T>
Example: Since Integer is a subtype of Number,
List<Integer> is a subtype of List<? extends Integer> and
List<? extends Integer> is a subtype of List<? extends
Number>.
Thus, if an overridden method returns List<? extends
Integer>, the overriding method can return List<Integer>
but not List<Number> or List<? extends Number>.
Hierarchy 2 : A<T> <<< A<? super T> <<< A<? super S>
Example: List<Number> is a subtype of List<? super
2.7 Interface
2.7.1 Interface
-All methods in interface are automatically public,
whether the keyword is specified or not.
-Interface is an abstract class with no instance fields. All
fields in Interface are implicitly public, static and final,
whether the keywords are specified or not.
-Interfaces are not classes. You can never use new

-But you can declare: . An interface variable


must refer to implemented object:
-A reference of interface type can be cast to any class
that implements this interface.
-You can extend any number of interfaces.
-Classes can implement multiple interfaces. ->Multiple
inheritance
-Extend class and implements interface: only the
superclass method matter, the interface is ignored

-Multiple inheritance of state: inherit instance fields.


-Multiple inheritance of type: implement interfaces and
extend classes.
-Multiple implement with throw Exception: must throw
the subclass
2.7.2 Static and private methods
-Static has a body. You can redeclare a static method as a
default method in sub interface.
+ can’t inherit in interface, not like class. Must use
interface name to call. Static in class can called by object
variable.
-private: has a body. You can use private static or
instance methods
+private hide the vision of method from subclass->can
use methods same signature
2.7.3 Default methods
-Default methods supply a default implementation with
default modifier. It can call other methods.
-It has a body.
-A subinterface can redeclare an inherited default
method as abstract or provide a different
implementation.
-Resolve conflict default methods:
+Override the method with covariant return type
+Choose the method:

2.8 Enumeration

-enum is final + Can’t override clone().


-Enum constants are public, static and final ->-Can’t
access non-final static field in constructor.
-The enum values can be the same (MS1(“Ms.”),
MS2(“Ms.”)), we can set the value
-You can use anonymous class for enum constants:

-enums implicitly extend java.lang.Enum -> cant extend


anything else + Enums implement Comparable in the
natural order which they are defined
- can include methods and other fields. The compiler
automatically adds special methods: static values() and
valueOf(), ordinal() name().
-The constants are defined 1st, then fields + methods.
- constructor:
+Can’t access non-final static field in.
+ must be package or private
3. Exception handling (5%)
-Benefit: determine what to do when sth unexpected
happens
3.1 Dealing with Errors
3.1.1 The Classification of Exceptions

3.1.2 Declaring Checked Exception


- catch override a method: throw ordinal+subclass
exception, or not to throw anything or throw unchecked
exception
- catch Override a constructor: must throw ordinal or
superclassnot + may throw another Exception
-Static variable and static initializer only throw
ExceptionInInitializerError
3.2 Catching Exception
3.2.1 Catching an Exception
-Catch parameter is final
3.2.2 Catching Multiple Exceptions
-The catch clause for more specific exceptions should be
before the one for more general exceptions.
-You can catch multiple exception types in the same
catch clause:

+This feature only needed when catching exception types


are not subclasses of one another. The exception
variable is implicitly final
3.2.3 The finally Clause
-To continue executing the method when an exception
is caught:

+The code throws no exceptions: 1,2,5,6


+The code throw an exception: if the catch does not
throw an exception: 1,3,4,5,6; if the catch clause throws
an exception: 1,3,5
+The code throw an exception that is not caught: 1,5
-You can use finally clause without a catch clause:
+Method in finally clause is executed whether or not an
exception is encountered, unless System.exit()
+If method return value, check the unreachable:

remove return f after finally.


3.2.5 The try-with-Resources Statement
-resource implements AutoCloseable: close() throw
Exception
+close() order is reverse with resource create order
+Exception thrown in close() is added to suppressed
exception.
-Resource must be final
-can have catch and finally, there are executed after
closing the resources.
10. Database Applications with JDBC (2%)
10.1 Database connection, manipulation

-Use property:

10.2 Working with JDBC Statement


10.2.1 Executing SQL Statements
-Execute a SQL statement, 1st create Statement object by
Connection from DriverManager.getConnection()

-Place the statement into a string:

+enquoteLiteral(String): enquote values prevent SQL


injection attacks

-executeUpdate() return a count of rows affected by SQL


statement or zero.
+ can execute actions INSERT, UPDATE, DELETE, CREATE
TABLE, DROP TABLE…
-executeQuery(): SELECT
+This method returns ResultSet object to walk through
the result one row at a time:

+The order of rows is arbitrary. You can specify with


ORDER BY
+Take the contents of the fields:

There are accessors for various type, such as getString()


and getDouble(). Each accessor has 2 forms: string
(name column) and numeric (number column) argument.
Each get method make type conversions. Example:
getString() convert any type to string.
-execute(): return boolean
10.3 Query Execution
10.3.1 Prepared Statements
-Prepared statements:
- set<>()
+ 1st argument is the position
number of the host variable. 2nd argument is the value.
+setNull(int, in sqlType)
+ reuse a prepared query that already executed, all host
variables stay bound unless set() or clearParameters().
10.3.3 Stored Procedure
-Stored procedure:

-CallableStatement: prepareCall():

-Set parameter values:


setString(), setObject()….
-Register OUT (and INOUT) parameters:

Can use java.sql.Types or JDBCType


10.4 Scrollable and Updatable Results
Sets
-scrollable result, you can move forward and backward
through a result set and jump to any position.
-In an updatable result set, you can update entries so
that the database is automatically updated.
10.4.1 Scrollable Result Sets
-By default, result sets are not scrollable or updatable.
-Must obtain a different Statement object with:

-For a prepared statement:

-ResultSet: type and concurrency:


-Scrolling:
+ return true or false
+ move the cursor by any number of rows
+ set the cursor to a row number
+ get the current row number
+first(), last(), beforeFirst(), afterLast()
+isFirst(), isLast(), isBeforeFirst(), isAfterLast()
10.4.2 Updatable Result Sets
-Obtain updatable result sets:

-Note: Not all queries return updatable result sts


+The query is a join involves multiple tables not
updatable
+The query involves only a single table or join multiple
tables by their primary key: you should expect the result
set to be updatable.
+getConcurrency() to find out.
-Update:

-Add a new row to database:

+You can’t influence where the new data is added in the


result set or database.
+If you don’t specify a column value in insert row, it’s set
to SQL NULL. If the column has a NOT NULL constraint,
an exception is thrown and the row is not inserted.
-Delete the row under the cursor:
10.5 Transactions
10.5.1 Programming Transactions with
JDBC
-Turn off the default:
-If all statements have been executed without error:

-If an error occurred:


10.5.2 Save Points
-setSavepoint(): return Savepoint

-releaseSavepoint(SavePoint)
12. Date and Time API
12.1 Time Line
-Instant represents a point on the time line.
+Instant.MAX is 31/12/1000000000
+Instant.now() give the current instant.
+Instant.truncatedTo(ChronoUnit): make a copy
+You can compare 2 instants with equals() and
compareTo().
+Duration.between():

+get the length of Duration by toNanos(), toMillis(),


getSeconds(), toMinutes(), toHours(), toDays()
+toString() format: PT…H…M…S

12.2 Local Date


TemporalAccessor interface (get)-> Temporal interface
(plus, minus, until, with) -> LocalDate,Time… +
TemporalAdjuster interface

-Period express numbers of elapsed years, months, days.


toString() Period format: P…D
+Period.of(h,m,s)
-Compute the day:
+plus/minus(Period) or
plus/minusYear/Month/Day(number)
+until(): return Period or
until(day, ChronoUnit) return long
-getDayOfWeek(): value of DayOfWeek enumeration:

+DayOfWeek have plus() and minus():

-datesUntil() yield streams of LocalDate:

-There are also classes MonthDay, YearMonth, Year to


describe partial dates.
12.3 Date Adjuster

14.4 Local Time


-create an instance with now() or of():

-plus() and minus() wrap around a 24-hour day.


-Note: LocalTime doesn’t concern itself with AM/PM
-LocalDateTime class represent a date and time. This
class is suitable for storing points in time in a fixed time
zone (schedule of classes or events)
14.5 Zoned Time
ZoneId.getAvailableZoneIds() to find out all available
time zones.
-ZoneId.of(id) yields a ZoneId object. You can use it to
turn LocalDateTime into ZonedDateTime by
local.atZone(zoneId)
-Construct a ZonedDateTime:

+apollolaunch.toInstant() to get the Instant.


+ get ZonedDateTime from
Instant, use ZoneId.
-Daylight savings time: +1hour
+Get the time between in and out DST: get result -1h
-DST impacts to Duration -> use Period:

-
OffsetDateTime represents times with an offset from
UTCm without time zone rules.
9.Record and Sealed Class
9.1 Sealed class
-You can define permitted subclasses in the same file,
then you can omit permits:
-Permitted subclasses:
+Must extend the sealed class.
+Must be one of: final, sealed, non-sealed
+Must be in the same module or same package.
-Sealed interface: can have Record classes as permitted
subclasses
9.2 Record
- getters (Note: name of getter = name of instance fields,
example: name()), canonical constructor
-final: equals (true if objects of same type and values
match), hashCode (return same value for 2 objects if all
field values match implement), toString(name of
record+field names+field values)
-Record can’t be extended and can’t have extend clause.
-Record can Serializable interface
-Record may have at most 1 varagrs component.
-don’t have instance variable + instance initializers
-We can use static variables and static (and instance, not
setter) methods in record
9.2.3 Constructors
-Canonical constructor:
+ customize constructor for validation: (compact form)
+Example: fields aren’t null

+regular form canonical constructor: initialize all fields


-Non-canonical constructor: Create new constructors
with different arguments by supplying either a canonical
constructor or another constructor:

-Error when declare 2 canonical constructors:


+Example: compact form + regular form

11. Localization (2%)


11.1 Locale
11.1.1 Specify Locales
-A locale has 5 components: must have language
+country + language: format Dates
+country: format Currencies
- Locale.getAvailableLocales() return arrays all locales,
Locale.getISOLanguages() get all language code,
Locale.getISOCountries() get all country codes.
11.1.2 The default Locale
- Locale.getDefault()
+Local.getDefault(Locale.Category.DISPLAY or
Locale.Category.FORMAT)
-Locale.setDefault(Locale) or
Locale.setDefault(Locale.DISPLAY/FORMAT,Locale)
11.1.3 Display names
-getDisplayName(): describe the locale that can be
presented to a user.
+getDisplayName(Locale):

11.2 Resource bundle


11.2.1 Locate Resource bundles
-Specify naming convention for bundles:
+ For all country-specific resources::

+For all language-specific resources


-ResourceBundle.getBundle(String) or
ResourceBundle.getBundle(String, Locale)

+method tries to load bundles:

11.2.2 Property Files


-Internationalizing: place all strings into a property file.

+Name the property files:

-Resource.getBundle(): Load the bundle:

-getString(): Look up a specific string:

+Others: getLocale(), getObject(), getStringArray()


-getKey(): return Enumeration<String>:
11.3 Message format
11.3.1 Format numbers+dates
-MessageFormat.format()

+Supply an optional format for placeholders:

-The placeholder index has a type and a style. Separate


the index, type, style by ,.
+The type:

+If the type is number, the style:

or number format pattern $, ##0… See the


documentation of DecimalFormat class.
+If the type is time or date, the style:

or date format pattern: yyyy-MM-dd. See the


documentation of SimpleDateFormat class.
-Caution: MessageFormat.format() use current locale. To
format with an arbitrary locale:

11.4 Date format


-DateTimeFormatter class provides 3 kinds of formatters
to print date/time value:
-Static ofLocalizedDate(), ofLocalizedTime(),
ofLocalizedDateTime() + FormatStyle: SHORT, MEDIUM,
LONG, FULL
+These methods use default locale. Change withLocale()

-DayOfWeek and Month enumerations have


getDisplayName() for giving info in TextStyle and Locale

-DataFormatter.ofPattern():

+Add string in pattern:”eeee d’This is String’ MMMM ”


-parse()

-DateFormat:
+Static: getCalendar(), getDateInstance(),
getDateTimeInstance(), getInstance(), getTimeInstance()
11.5 Number format
java.text.
11.5.1 Format numeric values
-NumberFormat: getInstance(), getNumberInstance(),
getCurrencyInstance(), getPercentInstance().

-NumberFormat.getCompactNumberInstance()
-NumberFormat.getCompactNumberInstance(Locale,
NumberFormat.Style)
+NumberFormat.Style: LONG, SHORT(default)
-parse() throws java.text.ParseException

+parse() return abstract type Number. The returned


object is Double or Long. Use doubleValue() or intValue()
-format():
11.5.2 Currencies
-NumberFormat.getCurrencyInstance():
setCurrency(Currency)+Currency.getInstance(Locale/
String)
4. Working with Arrays and Collections (10%)
4.1 Arrays
4.1.1 Declare
-Declare:
-Use new to declare and initialize

-Note: Define array variable: int[] a or int a[]


-Shortcut :
-Anonymous array:
-Note: Have arrays of length 0 (not the same as null). Use
for empty result array. Construct:

4.1.2 Array methods


-copyOf: copy all values of one array into a new array

-mismatch(): find the 1st mismatch between 2 arrays


-compare():a value less than 0 if the first array is
lexicographically less than the second array. The number
is number of elements less since the last equal element
will be 3 because f >c -
>positive, (a,b) ->3
-clone(): return a shallow clone: create a new object but
have the same element object.
-equals() = “==” ->must point to same object
4.1.3 Multidimensional Arrays
-Two-dimensional array:

-Shorthand notation for initializing:

-For each in two-dimensional array:

4.1.7 Ragged Arrays


4.2 Comparator, Comparable
-comparing method: take a key extractor function that
maps a type T to a comparable type.

-You can chain comparators with thenComparing

-There are few variations of these method. You can


specify a comparator:

-Both methods have variants that avoid boxing of int,


long, double values:

-If your key function can return null, you will like the
nullFirst and nullLast adapters. These methods need a
comparator.

+Collections.reverseOrder() and reversed() of Collector


4.3 Collections
asd4.3.1 Collections Framework

-Collection Interface:

-Iterators:

+Inspect all elements in collection:


+forEachRemaining() with lambda:

+remove(): if you remove an element, you need to skip


past the element.

Remove 2 adjacent elements:


4.3.2 Interfaces in Collections Framework

-There are 2 fundamental collections interfaces:


Collection and Map.
+ insert elements with add() and put() in Map.
+Read elements with an iterator or read from a map with
get().
-List is an ordered collection. Element can accessed by
an iterator or by an integer index (random access). This
interface defines methods for random access:
+ListIterator defines a method for adding an element:

+There are 2 kinds of ordered collections: List with fast


random access and linked list with slow random access
+Note: Test a particular collection support efficient
random access, use RandomAccess:

-Set interface is identical to the Collection interface, but


methods is tightly defined: add() rejects duplicates,
equal(), hasCode()…
+SortedSet and SortedMap interfaces expose
comparator object for sorting, methods to obtain views
of subsets.
+NavigableSet and NavigableMap contain methods for
searching and traversal in sorted set and maps. They are
implemented by TreeSet and TreeMap.
4.3.3 Concrete Collections
-Linked list:
+Supply a subinterface ListIterator:

+listIterator():
+set():
+If an iterator traverses a collection while another
iterator is modifying it -> Exception:

+Tell the index of the current position: nextIndex() and


previousIndex(). List.listIterator(n) returns an iterator
that points just before the element with index n
+Other methods: add(4 variants), contains,indexOf,
remove(),get()
-ArrayList:
-TreeSet
+a sorted collection. ->Slower than HashSet
+ must implement Comparable or Comparator interface
-Queues and Deques:
+Queue: add at tail, remove at head:
Summary of Queue methods

Throws Returns special


exception value

Insert add(e) offer(e)

Remov
remove() poll()
e

Examin
element() peek()
e

+Deque: add/remove at head and tail


Summary of Deque methods

First Element (Head) Last Element (Tail)

Throws Throws
Special value Special value
exception exception

Insert addFirst(e) offerFirst(e) addLast(e) offerLast(e)

Remov
removeFirst() pollFirst() removeLast() pollLast()
e

Examin
getFirst() peekFirst() getLast() peekLast()
e

push()=addFirst(), pop()=poll()
Deque interface: ArrayDeque and LinkedList
-PriorityQueue:
+A priority queue retrieves elements in sorted order:
remove() get the smallest element currently. But the
priority queue doesn’t sort all its elements. It uses heap.
You can implement Comparable and Comparator.
+A typical use for a priority queue is job scheduling.
4.3.4 Map
-Note: only HashMap +LinkedHashMap support null
key+value.
-Collection elements: must be exact the type of variable

-Basic map operations:


+put(), get(key), get(null), remove(),
-Update map entries
Use getOrDefault()

+putIfAbsent(): opposite with getOrDefault()

+merge()

+compute(key)/computeIfAbsent(Function)/
computeIfPresent(BiFunction)
-Map views:
+The elements of the entry set are objects of a class
implementing Map.Entry interface.
+keySet() is class that implements Set interface.
Enumerate all keys of a map:

+Look up both keys and values by enumerating the


entries:

Or use forEach()
+If you remove() of the iterator on the key set view, you
remove the key and its value from the map. But you
can’t add element to the key set view.
-WeakHashMap
+ WeakHashMap class co-operates with the garbage
collector to remove key/value pair when the only
reference to the key is the one from the hash table entry
-LinkedHashSet + LinkedHashMap:
remember in which order you inserted items.
-IdentityHashMap:
+For comparison: use ==, not equals()
4.3.5 Views and Wrappers
-Small collections: .of()

+of():changes in ordinal collection change these


collections. toString(): [[]]
+of() and copyOf() don’t support null element
+List and Set interface has 11 of() with 0-10 arguments
and 1 of() with a variable number of arguments.
+Map interface has a static method Map.ofEntries() that
which you can create with Map.entry():
+These collection objects are unmodifiable. If you want a
mutable collection, pass to ArrayList:

-Subranges:
+subList(): obtain a view into the subrange of list:

operation to subrange reflects the entire list.


+ sorted sets and maps,

SortedSet

SortedMap
Navigable

+The element inserting must fall within the range


-Unmodifiable Views
Collections class has methods that produce unmodifiable
views

-Synchronized Views

4.3.6 Algorithms
-Sorting and Shuffling:
+sort: implement List+ Comparable :

Rule: Number before letter, uppercase before lower,


shorter before longer when character same (1,10,9…)
-sort(): pass a Comparator object.

+Sort in descending order: Comparator.reverseOrder():


sort the reverse according to
the order given by compareTo().
+reversed()
+Collections.shuffle()

-Binary search:
+Collections.binarySearch():sorted in ascending
order,implement List

If no: -(insert point +1)


-Simple Algorithms

-Bulk operations:
+ : remove all elements from coll1 that
are present in coll2.
+ remove all elements from coll1 that
are not present in coll2.
+Find the intersection of 2 sets:

+Apply a bulk operation to a view. Fired employee:


-Convert Collections and Arrays
+Turn an array into a collection: List.of() wrapper

+Turn a collection into array: toArray()

4.3.7 Legacy Collections

-Hastable:
+Hashtable: HashMap+synchronized methods
+If you don’t require compatibility with legacy code, use
HashMap. If you need concurrent access, use
ConcurrentHashMap.
-Property Map:
+Property map is a map structure of a special type. It has
3 characteristics:

+Properties maps are useful in specifying configuration


options for programs.

+store(): save map list of properties to a file

+load the properties from a file:

+System.getProperty(): yield a Properties object to


describe information
+System.setPropperty()
-Stack: push(),pop(),peek().
4.4 Generic, wildcards
-Declare a generic class: Type parameter: not use ?, use
a single uppercase letter, can use existing class
(Object…), extends
-Generic of class declaration and method declaration:

Ok False
-Generic methods:
-Wildcard:? Use in variable reference in generic:

= + Test must be generic

+When use Collection like: Collection<? extends/super


Number>, elements must be this class or
subclasses/superclasses
5 Working with Streams and Lambda
expressions (15%)
5.1 java.util.function package
-Lambda only use with interface having only one
abstract method
-a->b->a-b = a->(b->a-b)
5.3 Java Streams filtering, transforming,
processing, reduction, grouping,
partitioning
5.3.1 Stream Creation
-Turn collection to stream: stream()
-Turn stream to array: toArray()
-Turn array into a stream: static Stream.of()

+ : make a stream from a part of array


-sequential(): make equivalent stream
-Stream.empty():

-Making infinite streams:


+Stream.generate() : Supplier<T>

+Stream.iterate():UnaryOperator<T> interface
-Stream.ofNullable
- Iterable ->stream

-Iterator -> stream:

5.3.2 Filter, map, flatMap


-filter():Predicate<T>

-map(): Function

-flatMap():use when element can create stream itself

5.3.3 Extract substreams + combine streams


-Extract stream:
+limit(n):
+skip(n):
+takeWhile(predicate) >< dropWhile(predicate):
- Stream.concat():

-Spliterator<>:
+spliterator(): create Spliteartor
+trySplit(): split the 1st half go to the result and the
remain half remain with original one.
+forEachRemaning():

will print 4658


and 3721
5.3.4 Other Stream Transformation
-distinct():

-sorted(): empty or Comparator interface

-peek(Consumer): only run before terminate operation


5.3.5 Reduction
-count(): return long
-max(), min():Predicate: return Opetional<T> value

-collect(),reduce()
-Not reduce methods but useful:
+findFirst(): often useful when combined with filter

+findAny: combined with a filter

+anyMatch, allMatch, noneMatch(): Predicate

5.3.6 Optional Type


-Get an Optional value:
+orElse():

+orElseGet(Supplier):Compute the default:

+orElseThrow()
-Consume an optional value:
-ifPresent(Consumer):
-ifPresentOrElse(Consumer,Runnable): take one action if
the Optional has a value and another action if it doesn’t

-Pipeline optional values:


-Another useful strategy is to keep the Optional intact.
+map(): Function +return Optional

+filter(): Predicate + return Optional

+or(): if Optional empty -> Supply return Optional

+isPresent(), isEmpty()
-Create optional values:
Optional.of(result) and Optional.empty()
+Optional.of(null)->throw Exception
->Optional.ofNullable(obj): returns Optional.of(obj) if
obj is not null and Optional.empty() otherwise.
-Optional<Int/Long/Double>:
+getAs<Int/Long/Double>

5.3.7 Collect Results


Print: iterator() or forEach():
+forEach() arbitrary order.
forEachOrdered(): same order
- toArray()
-collect(Supplier,BiConsumer,BiConsumer)
-collect() + Collector interface:
+Collectors.toList():

+Collecters.toSet():
+ Collectors.toCollection(Constructor):
+Collectors.joining():
+Delimit between elements:

+summarizing(Int/Long/Double): return
wa(Int/Long/Double)SummaryStatistics: getCount(),
getSum(), getAverage(), getMax(), getMin()

5.3.8 Collect into Maps


-Collectors.toMap()

+If duplicate keys ->throw IllegalStateException


+ Function.identity(): values are actual elements

+3rd argument: BinaryOperator determines the value for


the existing key:
+ 4th: Supplier + constructor

5.3.9 Group + Partition


-groupingBy():Supplier

+Locale::getCountry() is the classifier function of the

+ groupingByConcurrent()
- partitioningBy(): Predicate.

5.3.10 Downstream Collectors


-groupingBy()+downstream collector:
+Collector constructor:

+Collectors.counting():
+Collectors.summing(Int/Long/Double):To<>Function

+Collectors.averagingDouble/Int/Long(): To<>Function
+Collectors.maxBy, minBy: Comparator

-Collectors.collectingAndThen(): Collector constructor +

Function
-Collectors.mapping():Function +Collector constructor

+flapMapping():
+Collectors.summarizingInt/Long/Double:To<>Function

+Collector.filtering:Predicate+Collector Constructor
5.3.11 Reduction Operation
-reduce(BinaryOperator): return Optional

-reduce(T identity, BinaryOperator): return T

-To operate of some property:

5.3.12 Primitive Type Streams


-IntStream, LongStream (store short, char, byte,
boolean), DoubleStream(float, double) that store
primitive values
+<Int/Long/Double>Stream.of():primitive array

+You can also use generate() and iterate(). InStream and


LongStream have static range() and rangeClosed()

-mapToInt/Long/Double(): To<>Function

+boxed(): convert a primitive type stream to object


+count() , sum(),average(),max(), min(): last 3 use
Optional
-Don’t have Collectors.collect()
5.4 Sequential and parallel streams
-Collection.parallelStream():

+parallel() convert sequential into parallel:

-stay away from mutable state (like group them)

-By default, streams that arise from ordered collection


are ordered.
+.unordered.distinct()
+limit():
+Collectors.groupingByConcurrent(): the order will not
be the same as the stream order.
-Create equivalent stream: onClose(), parallel(),
unordered(), sequential()g
8. Java I/O API (5%)
8.1 I/O Streams
-input stream: object read bytes, output stream: object
write bytes
-Most of I/O operations throw IOException
-Process bytes + characters:

-Unicode text:
+The basic methods:
8.2 I/O usually seen
-InputStream:
+
+readAllBytes()
-OutputStream
+

+
+transferTo(): transfer all byte from I to O
+available(): number of bytes available to read

+close() and flush()


-Individual Characters:
OutputStreamWriter: turn an output stream of Unicode
code units -> stream of byes
IntputStreamReader: turn an input stream containing
bytes -> reader that emits Unicode code units

-PrintWriter: print strings and numbers in text format


+PrintWriter: File, String, OutputStream
+void print()+println()+write(), PrintWriter printf(): print
numbers, characters, Boolean, strings, objects

By default, autoflush is not enabled.

+setError(): indicate error


-DataInput and DataOuput Interfaces
+DataOutput: Write number, character, Boolean value or
string in binary

+DataInput: read data

+DataInputStream+FileInputStream: Read binary data


from a file:
+Write binary data:

-RandomAccessFile
+Constructor: File+String
+implement both DataInput + DataOutput
+Modes: "r", "rw", "rws", and "rwd". If file doesn’t exist:
r:throw exception, others: attempt to create file
+write/readUTF(): UTF-8
+File pointer: seek(), getFilePointer()
-FileReader/FileWriter:
+Constructor: File, String

+The input is 01234567, the 1st iteration is 01234, but the


2nd is 56734
-BufferedReader
+BufferedReader(FileReader)
+markSupported(): check whether can use mark()
+mark(int): mark the present position,
+reset(): return to most recent mark
+read(), read(cbuf), readLine(), lines()
-Throw Exception
+java.io.FileNotFoundException: FileInputStream,
FileOutputStream, RandomAccessFile
+java.nio.file.NoSuchFileException: create
Reader/Writer from a Path
-Console class:
+read and write only character
+Can be acquired when JVM is started from cmd without
redirecting standard input and output streams.
+Console cons = System.console();
+printf(),readLine(), readPassword()
+writer(), reader()
+charset(), flush()

-System.in:
+a variable of java.lang.System
+The standard input stream:This stream is already open
and ready to supply input data.
+Can’t be reassigned to any other stream directly: must
use InputStream.setIn()
8.2 Serialization
-Object must implement Serializable and serial number
-ObjectOutputStream:

-ObjectInputStream:

-Object I/O stream implement DataInput/DataOutput


-Serializing: only data member of class implement
Serializable and its subcass will be serialized.ww
-deserialized: don’t call class constructor and transient
value-> default values but run superclass no-args
constructor which is unserializable.
-serialVersionUID: the version number of the class. If
don't specify serialVersionUID -> automatically adds this
field. If different serialVersionUID-InvalidClassException.
-serialVersionUID must be static, final, type long

8.3 Files
8.4.1 Paths
-path format: start with / or c:
-Paths.get

-p.resolve(Path q): if q is absolute, the result is q.


Otherwise, the result is “p then q”.
+Shortcut using String:

-resolveSibling():replace the last component

+p.relativize(r): find the way to get from p1 to p2

-normalize(): remove any redundant . and A\\..


components:

+It removes /harry/.. and .


- toAbsolutePath() yields the absolute path, start at a
root component.
-Path interface methods:

+getName(int):

+getNameCount(): count all component


8.4.2 Files and Directories
-Files.createDirectory(path): last component must exist
->Files.createDirectories(path)
-Files.createFile(path): create empty file, throw
exception if already exist
-Files.copy(fromPath, toPath)
-Files.move(fromPath, toPath)
+Fail if toPath exists. If you want to overwrite, use
REPLACE_EXISTING. Copy all file attributes:
COPY_ATTRIBUTES
+Specify an atomic move: ATOMIC_MOVE

If you delete fromPath after ATOMIC_MOVE->Exception


-Files.delete(path)
+This method throws an exception if file doesn’t exist
+Another delete: true if deleted or false if no exist

+These methods can be used to remove empty directory.


-Files.find(path, int maxDepth, BiPredicate<Path,
BasicFileAttributes>, FileVisitOption…)
-Files.list(Path)
-Files.walk(Path,FileVisitOption…)
-Files static methods for information:

-Files.size(): number of bytes

-Files.lines(Path): return Stream<String>


+Files.readAllLines(Path):return List<String>
-Files.newDirectoryStream()

+Filter the files with a glob pattern:


7. Concurrency (4%)
-Multitasking: OS’s ability to have more than one
program working the same time.
-Multithread programs: Do multiple tasks, each task is
executed in a thread.
-Multiple processes: have a set of its own variables,
multiple threads share the same data.
7.1 Thread States
-New Threads:
+When creating a thread with new
+Not yet running
-Runnable Threads
+invoke start()
+May or may not be running.
-Blocked + Waiting +Time waiting Thread
+Block: thread tries to acquire a lock held by another
->unblock when all other thread relinquish the lock
+Waiting: waits another thread to notify condition:
Object.wait(), Thread.join(), wait Lock or Condition
+Waiting Time: have timeout parameter: Thread.sleep(),
Object.wait(), Thread.join(), Lock.tryLock(),
Condition.await
-Terminated Thread: because natural death (run() exits)
and uncaught exception.
7.2 Thread Properties
-Interrupting Thread:
+interrupt(): request termination + set interrupt status
(Boolean flag)
+isInterrupted(): Blocked thread can’t use.
-Daemon Thread
+Serve other threads: setDaemon(true)
+Only daemon threads remain -> exit
-Thread Names
+By default: like Thread-2
+setName(String)
-Uncaught Exceptions
+run() of method can be terminated by an unchecked
exception. Before that, it’s passed to handle
implementing Thread.UncaughtExceptionHandler
+ : install a handle into any thread
+Thread.setDefaultUncaughtExceptionHandler()
-Don’t install default handler->null, Don’t install handle
for individual thread-> ThreadGroup object
-Thread Priorities
+Default: thread inherits priority of thread constructing it
+setPriority(): MIN_PRIORITY (1) and MAX_PRIORITY (10)
, NORM_PRIORITY (5)
+highly system-dependent
7.3 Synchronization
7.3.1 Lock Objects
-Lock interface:
+Use ReentrantLock:

When one thread locks, no other thread can get past the
lock() until it unlock
+tryLock()=check free+lock()
+Declare lock as private + final is a good way.
+ReadWriteLock interface: a pair of Locks: Read Lock
(multiple threads read simultaneously as long as no
thread writing) and WriteLock(one thread write to the
resource, and no thread (including readers) can access)
ReentrantReadWriteLock
+readLock().lock()/unlock()
+writeLock().lock()/unlock()
7.3.2 Condition Objects
-Condition object: manage threads that have acquired a
lock but can’t do useful work
-newCondition():
-await(): thread is deactivated, give up the lock + enter a
wait set until another thread signalAll()
-signallAll(): reactivates all threads waiting, remove from
wait set, acquire the lock and continue
+singal(): unblock a single thread randomly. If no other
thread call signal() again -> deadlocks.
-Simple structure:

7.3.3 synchronized Keyword


-Every object has an intrinsic lock.
-synchronized method -> object lock protects it
Is the equivalent of:

-wait(),notifyAll(),notify():
-Can use synchronized static method
-Synchronized methods ends with check exception->lock
is released automatically.
7.3.4 Synchronized Blocks

+When complete append(), OS stop this thread and start


the 2nd thread, but still have the lock of sb1.
7.3.5 Volatile Fields
-Offer a lock-free mechanism for synchronizing access to
instance field ->concurrently updated by another thread

7.3.6 Atomic
-Atomicity: operations that are performed as a single,
indivisible step ->thread-safe
->guarantee that correct vale is computed and returned
even multiple threads access.
-Final atomic can use mutator and must initialize
-Atomic<Long/Integer/Boolean>
+addAndGet(), decrementAndGet(), compareAndSet()
7.3.7 Deadlocks
-All threads get blocked

-Nothing to avoid or break deadlocks


7.3.8 Thread-Local Variables
-ThreadLocal helper class: give each thread its own
instance
7.4 Thread-Safe Collections
7.4.1 Blocking Queue
-Java.util.concurrent package :
+Blocking Queues: LinkedBlockingQueue,
ArrayBlockingQueue,PriorityBlockingQueue
+DelayQueue: implement Delayed
+LinkedTransferQueue: implement TransferQueue
7.4.2 Maps, Sets, Queues
-ConcurrentHashMap,
ConcurrentSkipListMap(put,remove),
ConcurrentSkipListSet(add,remove),
ConcurrentLinkedQueue(add,remove,peek,poll).
-Return weakly consistent iterators->remove when for
7.4.5 Copy on Write Arrays
- CopyOnWriteArrayList and CopyOnWriteArraySet:
thread-safe collections which all mutators make a copy
of the underlying array ->can remove() when for
7.4.7 Older Thread-Safe Collections
-Synchronization Wrapper: See in Collections
7.5 Tasks and Thread Pools
7.5.1 Callables and Futures
-Runnable: encapsulates a task running asynchronously,
no parameters, no return value
-Callable: Runnable but return value

-Future: result of asynchronous computation

-FutureTask: execute Callable

-Commonly, pass Callable to Executor


7.5.2 Executors
-Executor interface: execute(Runnable)
-ExecutorService: extends Executor
-Construct thread pools:
-submit(): run submitted task

-shutdown(): all tasks are finished, threads in pool die


-shutdownNow():
-ScheduledExecutorService: scheduled or repeated
execution of tasks
+ newScheduledThreadPool,
newSingleThreadScheduledExecutor
+schedule(): run once after a delay or run
periodically
7.5.3 Controlling Groups or Tasks
-invokeAll(): submit all objects in Callable object
collection + return result of completed task.
+The 1st reulst.get() blocks until the 1st result is available
-> get orderd.
- ExecutorCompletionService: efficient, no order

-invokeAny(): return 1st result


7.6 In Exam
-Deadlock: 2 ore more threads are blocked forever,
waiting for each other
-Livelock: Both threads release and acquire locks but
none of them get the locks. Neither of them is blocked
but don’t do any work. They notifying each other.
- Resource Starvation: single active thread is unable to
gain access to shared resource. Livelock is special case of
resource starvation.
Example: because different thread priorities
-Thrashing: program make little or no progress because
threads perform excessive context switching. This may
leave little or no time for app code to execute
-Race condition: result when 2 tasks that should be
completed sequentially are completed at same time.
6. Java Platform Module System (5%)
-Some issues that JPMS doesn’t address: versioning.
-JDK built-in modules:
+java: base, compiler, datatransfer, desktop, instrument,
logging, management, naming, net,scripting, se, sql,
security, transaction, xml
+jdk: accessibility, attach, charsets, jartool, javadoc,
jdeps,jshell,management,net…
6.1 Modular vs non-modular application
-A module can be deployed by placing all its classes in
JAR file, with a module-info.class in the root. This JAR file
is a modular JAR.
-Service: Service = Service locator + Service provider
interface
-Service provider interface:
+Only exposes the service interface

+all parts must point to


-Service provider: implement a service
+requires the interface + provides implementation

+nothing has a direct dependency on


-Service locator:
+uses interface, requires service provider interface
module and exports package of locator
+reference the service provider interface directly +
service provider indirectly
+Contain load()
-Consumer:
+depends on service provider interface and service
locator. -> 2 requires
-ServiceLoader class:
+match up service interface+implementation
->add functionality without recompiling
+ServiceLoader.load(Class): return Iterable<>
+map(Provider::get):Return instance of service provider
-Bottom-up migration:
+1st: the lowest level dependencies converted into
named module. Then the upper level dependencies
converted into named module…
+For example, if a class in A.jar directly uses a class from
B.jar, and a class in B.jar directly uses a class from C.jar,
you need to first modularize C.jar and then B.jar before
you can modularize A.jar.
+Thus, bottom up approach is possible only when the
dependencies are modularized already. Effectively, when
bottom-up migration is complete, every class/package of
an application is put on the module-path. Nothing is left
on the classpath.
-Top-down migration:
+Start with packages you are most interested in and
upgrade them as named module without worrying
converting their dependencies to modules. Put
dependencies on module-path or classpath
+Other jars newly created and don’t want to modularize
yet need to put on module-path and add requires.
6.2 Named module, unnamed modules,
automatic modules
6.2.1 Naming module
- Like package name.
- letters, digits, underscores and periods(must).
-No access modifier: public, protected, private.
- no hierarchical relationship between modules.
6.2.2 Unnamed Module
-Named module: must be on module path + contain
module-info file
- unnamed module: not on module path
6.2.3 Automatic Modules
-Automatic module: on module path + not contain
module-info
-Code on classpath can reference code in automatic,
named and unnamed module
-Code on modulepath can reference code in automatic
and named module.
6.3 Expose, compile, run, deploy module
6.3.1 Example

-module-info.java in base directory. By convention, the


base directory name=module name.

-Compile:

-Run:
+ --module-path = -p: directories contain modular jars or
specific modular or non-modular jar
+--module= -m: File class
+-classpath:
-Package:
: file .jar in mods.
6.3.2 Module keywords
-exports(package): indicate a module intends for those
packages to be used by Java code outside the module

Update module:

-exports A to B: Only B can use A


-requires B: The module depends on module B -> module
dependency relationship
-requires transitive A: any module requiring the original
module will also depend on A. ->implied readability
+Dont requires + require transitive the same module

-provides A to B: provide service A an implementation B

-uses A: module is relying on service A

-opens A: Allows module using A to use reflection


-opens A to B: give that privilege to B package.
6.3.3 Command Line
+--module-source-path: specify the location of module
source files
javac --module-source-path <dir> -d <dir> file
-jdeps: analyzes the dependencies
+jdeps --module-path .jar
+jdeps –classpath path .jar
+jdeps –s/summary
+--jdk-internals: analyzes all classes on jar file for class
level dependence on jdk’s internal API.
+--class-path or –cp: analyze include dependent
nonmodular jar files
+--list-deps: list all modules module depends
-jlink: produce image executing without Java runtime
-jmod: Build modules file including JDK
+5 options: create, describe, extract, hash, list
0. Exam Check point
0.1 Handling values
0.1.1 Date and Time API

0.1.2 Manipulating text

0.1.3 Operation, promotion, casting


-NullPointerException: call method in null, access fields
in null
-char is integral data type.->print number
-float: 0x0123,4f double: 1.0, 43e1
-Short circuit: &&, ||

increment just used in


line 1 and 3
0.2 Java OOA
-Garbage collection
+Object will be eligible: when it’s null or when method
reaches the end
0.3 Control Program Flows
-Loops
-If/else, switch
0.4 Arrays and Collections
-Arrays
-Collection API
-Generic class
+List<? Extends Number> list
Number n = list.get(0)
+Integeger hasCode() return int value
0.5 Exception handling
-Don’t use try catch to control flow (for,while…)

- Always catch or throws


exception
0.6 Concurrency
-Runnable, Callable, Lifecycle, Executors
-Thread safe code

0.7 IO API
0.7.1 Serialization
0.8 Modules
-Basic
+Modules benefits: improve security + maintainability
-Migration to Modular App
-Services in Modular App

0.9 JDBC

0.10 Streams and Lambda

0.11 Localization
-DateFormat + NumberFormat

You might also like