Professional Documents
Culture Documents
Day 2
Day 2
---------
variable is a container which can hold data
x=100;
itemprice=10.50
age=30
int x=100
float itemprice=10.50;
String name="john";
Data types
------------------
1) premitive
String
ArrayList
HashSet
HashMap
etc....
------------------------------
statically typed langauge
1) int x;
data type must be specified
2) int x;
flaat x; // not allowed
3) int x=100;
x=200; // change the value of the variable is possible
----------------------------------------------------
Python is dynamically typed language
x=100;
x=10.50
x="john"
x=true
String str="john"
Syso(str)
char c='A';
Syso(c)