dual-screen-1745705_1280 (1)

Advanced Java Programming

Course Hours:  Total 20 Hrs

Class Time: Open for enrollment

Course Arrangement :

Wednesday 8:00pm – 10:00pm Pacific Time

Fee: $880

Scroll down for detailed information of course description, course outline, instructor and enrollment.

Product Description

  • Popularity

    Target students are anyone who likes coding, especially Java programmers and developers who look for quality, productivity and success in his/her software career.

  • Practicality

    Through practice in the class and at home, you will grasp good coding habit and discipline, one at a time, to be experienced software professional, art of writing agile and highly maintainable software.

  • Workability

    New features of Java 6 through 9 are also covered.

    The course is mainly based on 3 books: Effective Java, Clean Code, and Design patterns (GOF book).

Course Description

This course talks about customary and effective use of Java.  We systematically present advice on how to write clean and reusable code, with solid object-oriented structure, following proved design patterns.  We will talk what works, what doesn’t, how to use Java and its libraries to best effect. Real code and API examples are run and examined.

1. Creating and Destroying Objects

  1. Consider static factory methods instead of constructors
  2. Consider a builder when faced with many constructor parameters
  3. Enforce the singleton property with a private constructor or an enum type
  4. Enforce noninstantiability with a private constructor
  5. Avoid creating unnecessary objects
  6. Eliminate obsolete object references
  7. Avoid finalizers

2. Methods Common to All Objects

  1. Obey the general contract when overriding equals
  2. Always override hashCode when you override equals
  3. Always override toString
  4. Override clone judiciously
  5. Consider implementing Comparable

3. Classes and Interfaces

  1. Minimize the accessibility of classes and members
  2. In public classes, use accessor methods, not public fields
  3. Minimize mutability
  4. Favor composition over inheritance
  5. Design and document for inheritance or else prohibit it
  6. Prefer interfaces to abstract classes
  7. Use interfaces only to define types
  8. Prefer class hierarchies to tagged classes
  9. Use function objects to represent strategies
  10. dFavor static member classes over nonstatic 1

4. Generics

  1. Don’t use raw types in new code
  2. Eliminate unchecked warnings
  3. Prefer lists to arrays
  4. Favor generic types
  5. Favor generic methods
  6. Use bounded wildcards to increase API flexibility
  7. Consider typesafe heterogeneous containers

5. Enums and Annotations

  1. Use enums instead of int constants
  2. Use instance fields instead of ordinals
  3. Use EnumSet instead of bit fields
  4. Use EnumMap instead of ordinal indexing
  5. Emulate extensible enums with interfaces
  6. Prefer annotations to naming patterns
  7. Consistently use the Override annotation
  8. Use marker interfaces to define types

6. Methods

  1. Check parameters for validity
  2. Make defensive copies when needed
  3. Design method signatures carefully
  4. Use overloading judiciously
  5. Use varargs judiciously
  6. Return empty arrays or collections, not nulls
  7. Write doc comments for all exposed API elements

7. General Programming

  1. Minimize the scope of local variables
  2. Prefer for-each loops to traditional for loops
  3. Know and use the libraries
  4. Avoid float and double if exact answers are required
  5. Prefer primitive types to boxed primitives
  6. Avoid strings where other types are more appropriate
  7. Beware the performance of string concatenation
  8. Refer to objects by their interfaces
  9. Prefer interfaces to reflection
  10. Use native methods judiciously
  11. Optimize judiciously
  12. Adhere to generally accepted naming conventions

8. Exceptions

  1. Use exceptions only for exceptional conditions
  2. Use checked exceptions for recoverable conditions and runtime exceptions for programming errors
  3. Avoid unnecessary use of checked exceptions
  4. Favor the use of standard exceptions
  5. Throw exceptions appropriate to the abstraction
  6. Document all exceptions thrown by each method
  7. Include failure-capture information in detail messages
  8. Strive for failure atomicity
  9. Don’t ignore exceptions

9. Concurrency

  1. Synchronize access to shared mutable data
  2. Avoid excessive synchronization
  3. Prefer executors and tasks to threads
  4. Prefer concurrency utilities to wait and notify
  5. Document thread safety
  6. Use lazy initialization judiciously
  7. Don’t depend on the thread scheduler
  8. Avoid thread groups

10. Serialization

  1. Implement Serializable judiciously
  2. Consider using a custom serialized form
  3. Write readObject methods defensively
  4. For instance control, prefer enum types to readResolve
  5. Consider serialization proxies instead of serialized instances

University of San Jose Main Campus Logo

Jigang Hao

Professor of USJ
Dr. Hao received his PhD of Computer Science at Tsinghua University. He is a senior scientist at Oracle, a big data expert at USJ. He has worked for Peoplesoft, Ebay, Visa, Boeing, Apple etc.


Reviews

There are no reviews yet.

Be the first to review “Advanced Java Programming”