Server Side Core


Training Topics

Java 6 & 7 Best Practices


Java 8 Best practices

2 Days

Java 6 & 7 Best Practices

( 3 days )

Day One – Morning

  • When to use collections like Map, Set, List or Queue. TreeMap vs HashMap vs LinkedHashMap, LinkedList vs ArrayList, WeakHashMap and IdentityHashMap.
  • When to use concurrent collections such as ConcurrentHashMap, ConcurrentSkipListMap, CopyOnWriteArraySet, CopyOnWriteArrayList. ConcurrentLinkedQueue.  Compared with Collections.synchronizedMap etc.
  • Writing a simple LRU cache with LinkedHashMap.
  • How to use references holders like WeakReference, SoftReference, AtomicReference
  • How to use value holders like AtomicInteger, AtomicLong, ArrayIntegerArray, AtomicLongArray

Day One – Afternoon

  • Using Readers and Writers.  How to chose the right character encoding.
  • Using Plain IO Stream for file and sockets
  • Using compressed streams.
  • Using NIO for file and sockets
  • Using memory mapped files.

Day Two – Morning

  • Writing toString() methods.
  • Using == vs .equals()
  • Writing equals() and hashCode() methods.
  • Writing Comparator(s) and Comparable(s)
  • How does HashMap really work compared with Hashtable, or ConcurrentHashMap

Day Two – Afternoon

  • Working with Random numbers. Generating integer and double in a range. Reproducable “random” numbers. Using Secure Random.
  • Working with Threads, Runnable, wait/notify, and sleep()
  • Using ThreadLocal.
  • ExecutorService(s) and Future(s).
  • Working with Exceptions/Errors/UncaughtExceptionHandler and getting stack traces.

Day Three – Morning

  • Unit testing code.
  • Timing your code.
  • How use time complexity. O(1), O(log N), O(N), O(N log N), O(N^2) and others.
  • Rounding floating point and formatting numbers.

Day Three – Afternoon

  • Adding arrays together, and splitting them.
  • using char[] and off heap to store passwords.
  • Using Reflections
  • Writing Externalizable objects

Java 8 Best practices

( 2 days )

Day One – Morning

  • Keeping it lazy.
  • Using Predicates and filters. How to combine and split them.
  • Using sorting and how to refactor sorting and comparing.
  • Using parallelStream() vs stream() vs stream().parallel().
  • Why can’t you use final or synchronized on default methods.
  • final vs effectively final and how to work around it.

Day One – Afternoon

  • Using the :: operator for static and instance methods.
  • Using forEach vs forEachOrdered() vs for-each vs collect vs reduce.
  • Using allMatch vs anyMatch vs noneMatch.
  • Using limit() and peak().
  • How does count really work and why is it using two lambdas.
  • Using map(), mapToXxxx() and flatMap(), flatMapToXxxx()

Day Two – Morning

  • Using custom thread pools in parallelStream() operations.
  • Serializable lambdas
  • Wrapping and re-throwing checked exceptions in lambdas
  • Working with infinite streams.
  • Changes to HashMap and ConcurrentHashMap in Java 8.

Day Two – Afternoon

  • How does MetaSpace work (which replaces PermGen)
  • JSR 310 DateTime (from JodaTime)
  • Using Optional.
  • Javadoc changes in Java 8.
  • StampedLock for low overhead locking.

£995 or

£495 early bird

per person per day
+ VAT ( Value Added Tax )

A maximum of

12 attendees

per instructor

for more information

Contact Us