explain text and number data types with examples
Answers
Answered by
1
Answer:
A data type is a type of data. For example, if the variable "var1" is created with the value "1.25," the variable would be created as a floating point data type. ... If the variable is set to "Hello world!," the variable would be assigned a string data type.
Answered by
1
Answer:
In java Text Data Types are as follows :-
1. String - String str = new String("Hello");
2. Charecter - char a = 'a';
In java Number Data Types are as follows :-
1. Integer - int a = 12422929;
2. Long - long lng = 742892;
3. Float - float flt = 7282.738;
4. Double - double dlb = 272.47328292992;
Hope it helps
Mark as Brainlist
Similar questions