1. #1
    Unregistered

    Define file, class and activity in Android?

    I am going to face some interviews but i am looking for a good answer for file , class and activity in Android. What does they stands for, how do we define them.

  2. #2
    soundtrack12 soundtrack12 is on a distinguished road
    Join Date
    Jun 2012
    Posts
    555

    Re: Define file, class and activity in Android?

    File- It is a block of memory for holding data, information. It is of varying size from few bytes to megabytes.It can have various formats depending on type of data it stores. In Android we have java, class files, apk, dex file formats.
    Class- When we compile a java file we get class file or we can say it is the compiled java file with error free machine understandable code.
    Activity- It is not a file but a class and it is similar to frame or window in graphical user interface tools. It can be extended in Android to include UI elements.

  3. #3
    Golu123 Golu123 is on a distinguished road
    Join Date
    Jun 2012
    Posts
    534

    Re: Define file, class and activity in Android?

    File - It is block of memory for having data stored in ti

    it varies in size.

    From some bytes to Megabytes

    The format may of various types

    Class- it is reqired to compile Java File .It is error freee and machine understandable code

    Activity - it is similar to class also to frame

    it can be extended to inculde U elements

  4. #4
    vivekomar99 vivekomar99 is on a distinguished road
    Join Date
    May 2012
    Posts
    263

    Re: Define file, class and activity in Android?

    Dear friend,
    As you have asked about the File, Class & Activity, I am going to brief these three one by one....
    File: This is the space given to the memory to hold the data/information given by the user. As we have discussed about the size of a file this could be in the size of bytes or in megabytes depends upon the length of the file.
    Class : A class file has got generated after the compilation of a Java file. The format is readable only for the machine.
    Activity : is concerned with the window into a graphical interface or GUI.

  5. #5
    karthik kukudala karthik kukudala is on a distinguished road
    Join Date
    Jun 2012
    Location
    saroor nagar
    Posts
    1,076

    Re: Define file, class and activity in Android?

    Hello friend,
    I was define a definition one by one,
    File::IT is a block of memory for having data stored .It having different size
    available in market.

    Class::When we compile a java file we get .class file ,and it is a machine understandable code

    Activity::It is similar to class and frame.

  6. #6
    saroj saroj is on a distinguished road
    Join Date
    Sep 2012
    Posts
    328

    Re: Define file, class and activity in Android?

    hello sirthese are different kinds applications internally .A FILE-> it is the normal window of storing data or saving datas called FILE.A CLASS -> it is an application related to file but it is organized by JAVA application.A ACTIVITY -> it is window user application that work in GUI.it is quite similar class frame but not exactly.thanks your

  7. #7
    gaurav98 gaurav98 is on a distinguished road
    Join Date
    Feb 2013
    Posts
    162

    Re: Define file, class and activity in Android?

    Difference between File ,class and Activity: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.

+ Reply to Thread

Similar Threads

  1. Which app is best in android for File Management?
    By Unregistered in forum Android Discussions
    Replies: 56
    Last Post: 07-07-2013, 06:08 PM
  2. Replies: 6
    Last Post: 12-03-2013, 09:14 PM
  3. Activity camera not working on Acer Liquid E
    By Unregistered in forum Android Discussions
    Replies: 11
    Last Post: 31-10-2012, 06:52 PM
  4. What is the difference between class file and activity?
    By Unregistered in forum Android Discussions
    Replies: 4
    Last Post: 10-08-2012, 04:40 PM