Skip to Main Content
The Definitive Guide to Jython: Python for the Java™ Platform
book

The Definitive Guide to Jython: Python for the Java™ Platform

by Josh Juneau, Jim Baker, Victor Ng, Leo Soto, Frank Wierzbicki
March 2010
Beginner to intermediate content levelBeginner to intermediate
544 pages
13h 28m
English
Apress
Content preview from The Definitive Guide to Jython: Python for the Java™ Platform

Chapter 6. Object-Oriented Jython

This chapter is going to cover the basics of object-oriented programming. We'll start with covering the basic reasons why you would want to write object-oriented code in the first place, and then cover all the basic syntax, and finally we'll show you a non-trivial example.

Object-oriented programming is a method of programming where you package your code up into bundles of data and behavior. In Jython, you can define a template for this bundle with a class definition. With this first class written, you can then create instances of that class that include instance-specific data, as well as bits of code called methods that you can call to do things based on that data. This helps you organize your code into smaller, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python Programming with the Java™ Class Libraries: A Tutorial for Building Web and Enterprise Applications with Jython

Python Programming with the Java™ Class Libraries: A Tutorial for Building Web and Enterprise Applications with Jython

Richard Hightower
Jython Essentials

Jython Essentials

Samuele Pedroni, Noel Rappin

Publisher Resources

ISBN: 9781430225270Purchase book