O'Reilly logo

Java Programming by Poornachandra Sarang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

image

CHAPTER

3

Classes

imagehe main motive behind using object-oriented programming is the code reuse. Java is an object-oriented programming language and therefore allows you to reuse your code. A typical Java application contains many objects. An object is an instance of a class. A program may contain many classes. In this chapter, you learn what a class is, what an instance of a class is, and how to use classes in your Java programs. We have looked at several Java programs in earlier chapters; however, all these programs used only one class. Therefore, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required