Data :- Data is a collection of your any information. it is a form in text, number ,image,symboll etc.
Variable :- when we allocate the memory in your program we declare the space in memory for storage the data. so In programming, a variable is a value that can change , depending on condtions or on information passed to the program.
Data Types in Java, C, C++, Python etc.
Data Types ( There are two types of data)
1 Primitive Data type 2 Non Primitive data types
primitive data types Non Primitive data types
Boolean ( True , Flase) String
Byte ( Integer) Array
Char (charater) class
Short (Integer)
Int (Integer)
Long (Integer)
Float (6,7 point)
Double (more than 10,12 point)
Declare the variable
Data Type variable Name ;
Exanples int a;
char a;
long a;
string a;
Some Rules for Declare a variable
1 Do not used any special symbols
2 Do not used reserved keyword.
3 variable name started with alphabet
4 only used underscore symbols
Reserved keyword in java
Int , char , Boolean, String, Static, do, while, if, else, catch, exception, class, const, constructor, final, default , else , private, public, protected, etc
No comments:
Post a Comment