Translating Java code to Scala

by Stephane Micheloud, July 2010

[Home]
[Back]

While most of us will agree that a growing developer audience contributes to the success of a new programming platform we too often neglect the importance of helpful sample applications during its early adoption phase.

Besides its conceptual merits the Android framework provides a powerful and well documented development environment with a plenty of nice Java code examples ! But we're still unsatisfied and we're looking for even more fun with the development of Android applications... so let's translate those sample applications into Scala !

In the following we resume our programming experiences with the translation of Java source code to Scala. We start our code review with basic examples and then focus on more advanced cases.

Basic Examples

We present here source code excerpts from concrete Android projects written in Java respectively in Scala and available in the .zip archives android-sdk.zip, unlocking-android.zip and apps-for-android.zip.

Advanced Cases

About the Author

Stephane's Picture
Stéphane Micheloud is a senior software engineer. He holds a Ph.D in computer science from EPFL and a M.Sc in computer science from ETHZ. At EPFL he worked on distributed programming and advanced compiler techniques and participated for over six years to the Scala project. Previously he was professor in computer science at HES-SO // Valais in Sierre, Switzerland.
[Top]

Other Articles