What Is a Class?
In a way, Object Oriented Programming (OOP) is a misnomer, as the fundamental things we're dealing with are classes. Perhaps it should have been called “Class-based Programming”, but it's too late to change now. So what's a class, and what's an object? There are several different ways of coming at this, and we'll try a couple of them. If you are already familiar with OOP, then just skim through the chapter to pick up the Java specifics. Be sureto visit the “What Is an Object?” section, which describes an object-oriented feature handled differently in Java (reference types).
Declaring a variable
To get a good understanding of OOP, you need to understand data types in procedural (non-OOP) languages. The idea of representing ...
Get Just Java™ 2 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.