Thursday, May 5, 2011

Inheritance for Android development

Inheritance is a very simple, but important part of iPhone and Android programming. Most object oriented programming relies on inheritance. Basically, if you think of genetics and how one inherits traits from his or her parents, the same principle relies in inheritance of classes.

When one class inherits from a super class, it inherits all of its methods. So, this will cut down on the amount of code you use and makes life more simple.

For example

public class test extends Activity

In this example test inherits from the Activity class.

New World War II trivia game for iPhone- Click here to download

No comments:

Post a Comment