0
Why doesn't Int take's double comma like String does?
6 odpowiedzi
+ 1
An integere only takes numbers like -2;-1; 0;1; 2; 3;...
A string can be everything. (letters, numbers, commas,...)
But you can't add two strings or do other calculations with them, because for the computer a string is just a serie of signs and not a number.
+ 1
int is a datatype used for integers....string is a datatype used for series of characters.... like abc.....@#a etc.....like most programming languages java also.... has a datatype int which can store whole no + or - since it is only a no it is stored without double quotes...... string stores data within double quotes....
+ 1
we write strings in a double quotes just to distinguish the keywords from your string. you can have strings like if,while,static... and so on the keywords of the respective languages. if we don't give quotes the compiler will give an error saying syntax error or l value required or the respective error.
0
Can you give an example of what you mean by "double comma"?
0
we can not do below in the code. Why?
sayhello("david","dhoni","kohli");
- 2
because youve got a brain demention