tags:

views:

51

answers:

3

Hi all,

What's the difference between file, class and activity in android? Thanx in advance.

A: 

File is a file on the filesystem. Class is a Java class. Activity is a specific java class commonly used in Android.

fhucho
Thanx fhucho... It helped..
neha
A: 

An activity is actually a class (click) and if you want to make your own activity you choose this one as parent class. And the source code of classes is defined in files, actually every class should be described in its own file.

That's some basic knowledge of object oriented programming - you might want to have a look here to find more information

Martin
+2  A: 

File - It is a block of arbitrary information, or resource for storing information. It can be of any type

Class - Its a compiled form of .Java file . Android finally used this .class files to produce an executable apk

Activity - An activity is the equivalent of a Frame/Window in GUI toolkits. It is not a file or a file type it is just a class that can be extended in Android for loading UI elements on view

Rahul