If you’re comfortable developing in C++, you should definitely use C++ instead of C for your BREW application if you’re targeting Java. The reason is simple: the support C++ provides for object-oriented development lets you organize your application in a manner very similar to how your Java application is organized. By designing your application in C++, you can create classes that map to your Java classes, eliminating the need to translate a procedural application in C to a class-based Java application or to use object-oriented programming tricks in C (see the next section) to simplify your move to Java.
When developing code in C++ that you anticipate moving to Java, you should remember that Java doesn’t have support for multiple inheritance, operator overloading or templates, so you simply should avoid using these features. You should also heed the suggestions in the next section for crafting portable C code, because these rules apply equally to C++.
Read more … »


