You are on page 1of 24

Java Programming.

#1
Emil Dzhangirli
Course chat
Course plan

 Intro to Java
 Collections
 OOP
 Project building. Maven, Gradle
 Exceptions, annotations, generics
 Stream API
 Exam 1
 Concurrency
 Exam 2
 Spring, REST API, Android
Homeworks

 5 homeworks
 2-step homework review
 Auto tests at Yandex.Contest (HW 1,2)
 Code review at Github
 Deadlines (1-2 weeks for each homework):
 Soft: -50% of points
 Hard: -100% of points
Required software

 JDK: OpenJDK (preferable) or Oracle


 IDE: Intellij IDEA (preferable), Eclipse or NetBeans, (vim)
 Git: Github
Recommended books

 J. Bloch “Effective Java”


 Br. Goetz “Java concurrency in practice”
 J. Boyarsky ”OCP Oracle Certified Professional”
Important about Java

 Inspired by C/C++
 Write once, run anywhere (WORA)
 Two-step compilation
Two-step compilation
Memory structure
Garbage collection process
Garbage collection

 Advantages
 Less code
 Less memory leaks
 No invalid links

 Disadvantages
 No control over GC
 Stop The World pauses (while marking)
Garbage collection.
Generations hypothesis
Garbage collection.
Generations hypothesis
GC implementations

 Serial (for single-threaded, client environments)


 Parallel (default)
 CMS (Concurrent mark and Sweep — shorter pauses, share
processor resources)
 G1 (Garbage First — big heaps)
 Shenandoah (submillisecond pauses)
Standard library

 Data structures
 Math operations
 Date and time
 Work with file system
 GUI
Static typization

 Types:
 Primitives
 byte, short, int, long
 char
 float, double,
 boolean
 Objects
 Arrays
Primitive types
Primitive types
Types relationships
Char

 16 bit
 UTF-16 encoding
Char literals
Keywords
Unboxing / Autoboxing

 Oracle Tutorial
Input and output

 Input
 Scanner
 BufferedReader
 Output
 print / println
 printf

You might also like