Prakside kava
- Sissejuhatus.
- static vs dynamic; kompileeritud vs interpreteeritud; java, javac
- IDEA setup + run application
- discussion: skoop, primitiivid, täisarvudega jagamine, numbrite castimine, string -> int/double teisendus
- IDE tricks: psvm, sout, fori, ctrl+q javadoc; code style, reformat code
- Java põhikonstruktsioonid.
- pre/post-increment, ternary operator, class imports
- meetodi signatuur, overloading, void, early return, array[][]
- array loomise variandid, arraysse elementide lisamine, Arrays.toString
- harjutused: meetodid, arrayd, cli-args
- IDEA advanced: iter, rename symbol, extract method/var, ctrl+b, ctrl+alt+left/right, debugging
- koduste tööde esitamisest
- Objektid. Klassid.
- code style conventions. muutujate ja meetodite nimed
- constructor vs method, Object.toString, access modifiers, this (static meetodis?), getter/setter (encapsulation), default constructor, value vs reference
- instance vs class, final keyword, static keyword
- IDEA: alt+insert → generate constructor/getters/setters/tostring
- praksis teha P4, P6, H2, H4
- TODO rohkem aega harjutusteks, osad küsimused järgmisesse praksi
- Sõned. Failid. Listid.
- static method vs instance method
- static field
- object identity, string equals vs ==
- package, import
- java.io.File pitfalls
- generics; ide warnings
- praksis teha P1, P8, H3
- Polümorfism, liidesed
- kordamine (pass by value, static); signatuur
- kordamine: String vs StringBuilder
- interface, polymorphism, default methods, dynamic dispatch
- praksis peatüki teksti vahel olevad ülesanded
- Inheritance
- kordamine: final, private, pass by reference/value
- meetodi kutsumisel super, this
- constructor delegation, super()
- dynamic method lookup, instance vs static methods
- IDEA: ctrl+i, ctrl+o
- praksis P6, tabelid
- IO Streams
- kordamine: primitives
- streamide põhimõte, suurte failidega töötamise probleemid
- põhilised meetodid: read(byte[]), write(byte[]), close
- InputStreamReader, BufferedReader, DataInputStream/TLV/available()
- thread dumps
- tcp/ip in 5 minutes
https://github.com/mbakhoff/sockets-template
TODO kuidas kirjutada head protokolli - praksi ülesanded: P4, H5, P8
- Veahaldus
- rühmatööde tutvustus
- exceptioni viskamine, propageerumine
- millal püüda; rethrow!!
- finally, try-with-resources
- praksis P3, P6, P9, H4, H10
- Git
- Lõimed
- gson vs serialization
- kordamine
- ül 4, 5 live
- lambda näited, runnable lambda
- deadlock näide, thread dump
https://gist.github.com/mbakhoff/0fd51bfd653b778fcabc - Executors#fixedpool näide
- task: ül 2, 3
- task: parallel echoserver
- task: ül 8
- Item 66: Synchronize access to shared mutable data
- Collections, generics
- koduste ülesannete analüüs (bugid)
https://github.com/mbakhoff/oop-samples/tree/master/bugs - ül 2, 4, 7
- "How does a hashmap work?"
https://github.com/mbakhoff/hashmap-template - Item 9: Always override hashCode when you override equals
- koduste ülesannete analüüs (bugid)
- TODO: anon inner classes, rohkem lambda harjutusi
- JavaFX
- küsimused-vastused
- scene graph, layouts
- praks7 P3,P6,H2
- praks8 P1,P4,H1,H3
- Packaging + maven
https://github.com/mbakhoff/maven-template - Classpath, resource loading
https://github.com/mbakhoff/classpath-tutorial - Lambdas, method references, stream api
https://github.com/sim642/oop-lambda-template - JDBC: H2 embedded, prepared statement, transactions
https://github.com/mbakhoff/jdbc-template - JPA, Hibernate ORM
https://github.com/mbakhoff/jpa-template - Annotations + reflection
https://github.com/mbakhoff/reflection-template - Testing with JUnit; Mock objects, constructor injection
https://github.com/mbakhoff/testing-template - Profiling with VisualVM; Garbage collection
https://github.com/mbakhoff/profiling-template - Bitwise operators
https://github.com/mbakhoff/bitwise-template - Processes
https://github.com/mbakhoff/process-template - Visitor pattern
https://github.com/sim642/oop-visitor-template - Crypto basics
https://github.com/mbakhoff/crypto-template - Advanced synchronization
https://github.com/mbakhoff/synchronization-template
- Sissejuhatus.