0
Is space a string or character?
5 Answers
+ 3
space is a character while you put in single quotes . if you put in doible quotes then it will become consider as string
+ 1
First thing Space is not a Datatype , Space comes in "WHITESPACE" category.
Whitespace contains following as below;
1.Space 2. New line 3. Form feed 4. Tab.
Here String and character are both datatype not space.
+ 1
Space can be used anywhere in program . It doesn't affect program behavior . It makes program readable for user. There is no particular rules for putting space in program .
0
yes! got it. even space is a character
try this out char space=' '; System.out.println(space);
0
space is a character