O'Reilly logo

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

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

Java Types

In this section we're going to cover how Python handles the conversion from Java types when you pass arguments to Java methods and when those methods return values. First, though, let's briefly cover the Java basic types:

  • boolean— contains true or false

  • char— contains Unicode characters

  • byte— contains 8-bit signed integers

  • short— contains 16-bit signed integers

  • int— contains 32-bit signed integers

  • long— contains 64-bit signed integers

  • float— contains 32-bit floating-point numbers

  • double— contains 64-bit floating-point numbers

  • String— contains a string of Unicode characters

  • array— contains arrays of objects or primitive types

Primitive versus Basic Types

I define as Java basic types all of the primitive types plus any classes that have special ...

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