What You Will Learn With This eBook


  • Object-Oriented Concepts

    Learn about high level programming concepts with simple, straightforward examples. Understand the best practices that encourage beautifully written code.

  • Object-Oriented Programming

    Dive into the details of the language with thorough explanations of exception handling, generics, concurrency, and memory management.

  • Data Structures and Algorithms

    Comprehensive explanations of critical data structures in the Java Collections framework as well as the algorithms that work on them, such as searching and sorting.

  • Design Patterns

    Master creational, structural, and behavioral design patterns that every developer should recognize. See real examples of each pattern in the standard Java library.

  • How to Solve Programming Problems

    Follow three simple steps to tackle high-level programming problems. Learn the process of discovering solutions rather than memorizing them with detailed sample problems.

  • What to Expect During the Interview

    I'll walk you through a typical interview and prepare you for personal questions about your experience. I'll also tell you what questions you should ask (and which ones to avoid).

A great reference for job interviews... explanations are clear and concise.
John Doe
Vincent Saporito
Amazon Review
Does exactly what it says on the tin, great book to have handy.
John Doe
Scott J. Irvine
Amazon Review
I like this guide because it cuts right to the chase. No fluff, and no wasted time...
John Doe
Mark Mulvey
Amazon Review

Read a Sample Chapter


Introduction

The Java Programming Language

Object-Oriented Concepts

Object-Oriented Programming (Part I)

Object-Oriented Programming (Part II)

The Object Superclass

Composition & Inheritance

Abstract Classes & Interfaces

Exceptions

Generics

Concurrency

Memory Management

Java Database Connectivity

Web Applications

Web Services

Algorithms

Java Collections Framework

Important Interfaces

Creational Design Patterns

Structural Design Patterns

Behavioral Design Patterns

Reflection

Dependency Injection

Aspect-Oriented Programming

Unit Testing

Programming Problems

Interview Preparation

Interview Questions

Object-Oriented Concepts

Abstraction

Abstraction is the act of perceiving an entity from a narrow perspective. For example, in the context of education a person can be reduced to a student, and in the context of employment a person can be reduced to an employee. Each abstraction reduces the attributes of a person to a subset of relevant information. The goal of abstraction is to reduce complexity in software systems.

Encapsulation

Encapsulation is a technique that encourages abstraction by purposefully hiding information. For example, the mechanical details of a car engine are encapsulated behind a steering wheel and floor pedals. Anyone familiar with this interface could drive a car without knowing what type of engine was under the hood. Java encourages encapsulation through the use of interfaces and by providing access modifiers that limit the visibility of classes, fields, and methods.

Polymorphism

Polymorphism is a technique that encourages abstraction by allowing an entity to assume multiple forms. For example, a smartphone is polymorphic because it can assume the role of a camera, web browser, music player, or digital clock. Each application exposes a relevant interface to the user. In Java, an object can take on the form of any parent in its hierarchy or any interface in its hierarchy.

Mutability

Mutability refers to the ability of an entity to change its state. An iPod is an example of a mutable entity because its contents frequently change. A vinyl record is an example of an immutable entity because its contents are permanently engraved. Immutable objects provide numerous benefits in software applications, such as stability and thread safety. Strings and all of the primitive wrapper objects are examples of immutable objects. In order to make an object immutable, the class must be final, all fields must be final, and it cannot expose any mutable fields or methods that modify mutable fields.

Coupling

Coupling refers to the level of dependency that exists between two entities. For example, a cell phone battery that is soldered to a motherboard is tightly coupled because neither the battery nor the motherboard can be replaced without affecting the other component. A battery that snaps into the back of a phone is loosely coupled because both entities could be replaced independently. In software applications, decoupled components are more flexible and easier to maintain.

Cohesion

Cohesion refers to an entity's level of focus. For example, a Swiss Army knife is a low cohesion entity because it can do multiple things, but it can’t do them very well. A multi-tool could never match the productivity of a toolbox filled with highly cohesive tools. In software applications, cohesive components are more robust and easier to test.

Questions

What is the purpose of abstraction in software development?

What is encapsulation? How does Java support it?

What is polymorphism? How does Java support it?

What is the difference between a mutable object and an immutable object?

How can you design an object to be immutable?

What is the difference between coupling and cohesion?

What is the preferred relationship between software components and why?

Author

About the Author

Anthony DePalma is a Java aficionado who's conducted over 100 interviews at Fortune 500 companies. When he's not programming he can be found surfing the beautiful hurricanes of New Jersey. He lives down the shore with his wife and cats. This is his first book. Email Him