Content ITV PRO
This is Itvedant Content department
How programs store, process & manage data
What is Data?
Data is raw information processed by a computer.
In programming, every operation is performed on data.
Just like humans use information to make decisions,
computers use data to execute instructions.
Examples:
🔢 Numbers → 10, 45, 100
🔤 Text → "Meenal", "Java"
💰 Decimal Values → 99.99
✅ Logical Values → true / false
What is a Data Type?
A Data Type defines:
✔ What type of value can be stored
✔ Memory size required
✔ Allowed operations
Simple Meaning:
A Data Type tells the system what kind of data you are storing.
Real-life analogy:
🧴 Bottle → Stores liquid
🏦 Locker → Stores valuables
🎒 Bag → Stores books
Similarly, variables store specific types of data.
Why Data Types Are Important?
A Data Type defines:
✔ Prevents invalid data storage
✔ Improves memory efficiency
✔ Enhances performance
✔ Reduces runtime errors
✔ Makes code structured & readable
If incorrect data type is used →
⚠ Compilation error or unexpected output.
Classification of Data Types
In Java, data types are divided into:
Primitive Data Types
| Data Type | Example | Purpose |
|---|---|---|
| int | 25 | Whole numbers |
| float | 10.5f | Decimal values |
| double | 99.99 | High precision decimals |
| char | 'A' | Single character |
| boolean | true | Logical value |
Primitive types store single, simple values directly in memory.
int age = 21;
double price = 99.99;
char grade = 'A';
boolean isPassed = true;
JAVA
✔ Each variable strictly holds only its defined type.
Non-Primitive Data Types
Non-primitive types store multiple values or complex structures.
Examples:
String
Array
Class
Object
String name = "Meenal";
Here, String stores multiple characters as a sequence.
👉 These types store reference (address) of data in memory.
Real-Life Example – Student Record System
| Field | Data Type |
|---|---|
| Name | String |
| Roll Number | int |
| Marks | double |
| Pass Status | boolean |
Important:
❌ Name cannot be stored as int
❌ Marks cannot be stored as boolean
✔ Correct Data Type = Correct Storage + Accurate Results
What is Data Management?
Data Management means:
✔ Storing data
✔ Organizing data
✔ Updating data
✔ Deleting data
✔ Securing data
In programming, data is managed using:
Variables
Arrays
Collections
Databases
Real-Life Example – Banking System
Now after planning logic, we write actual code.
Definition :-
Syntax is the set of rules that define how a programming language must be written.
Syntax = Grammar of Programming Language
Without grammar, sentences become wrong.
Without syntax, programs give errors.
Just like English has grammar rules,
Java, Python, C all have syntax rules.
Memory & Storage Concept
int a = 10;
double b = a; // Implicit conversion
Two types of casting:
✔ Implicit (Automatic)
✔ Explicit (Manual)
double x = 10.5;
int y = (int) x;
Flow of Data in a Program
Real-World Applications
📚 School Management System
🏦 Banking Application
🛒 E-commerce Website
📱 Mobile Apps
💼 Enterprise Software
All depend on:
✔ Correct Data Types
✔ Proper Data Management
By Content ITV