---
title: "What's the difference between a file, a class and an activity in android?"  
description: "What's the difference between a file, a class and an activity in android?"  
author: "Joseph Rossignol"  
published: 2018-01-10  
canonical: https://answers.mindstick.com/qa/32814/what-s-the-difference-between-a-file-a-class-and-an-activity-in-android  
category: "technology"  
tags: ["android"]  
reading_time: 1 minute  

---

# What's the difference between a file, a class and an activity in android?

What's the [difference](https://www.mindstick.com/blog/398/difference-between-object-type-and-var-type) between a [file](https://www.mindstick.com/articles/59/encrypting-and-decrypting-files-using-c-sharp), a [class](https://www.mindstick.com/articles/12089/arrays-in-java-determining-class-of-an-array-part-8) and an [activity](https://www.mindstick.com/blog/23160/fidgetsguide-exercise-guides-newsletters) in [android](https://www.mindstick.com/articles/1672/android-internals)?

## Answers

### Answer by Prateek sharma

file - a file is a block which contains some information. it can be of any type.

class - a class can be defined as a blueprint which contains datatypes, methods, variables. these files are generated after execution of **.java** file.

Activity **-** an activity is a class in android which is used for loading of UI elements in the view.


---

Original Source: https://answers.mindstick.com/qa/32814/what-s-the-difference-between-a-file-a-class-and-an-activity-in-android

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
