0

Is space a string or character?

6th Apr 2016, 4:47 AM
R Ashwin Kumar
R Ashwin Kumar - avatar
5 odpowiedzi
+ 3
space is a character while you put in single quotes . if you put in doible quotes then it will become consider as string
25th Jun 2016, 5:08 PM
gandhiyash
+ 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.
9th Jul 2016, 8:19 AM
Vinod Luhar
+ 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 .
9th Jul 2016, 8:23 AM
Vinod Luhar
0
yes! got it. even space is a character try this out char space=' '; System.out.println(space);
6th Apr 2016, 8:09 AM
R Ashwin Kumar
R Ashwin Kumar - avatar
0
space is a character
30th Jun 2016, 10:57 AM
Aishwarya Patil
Aishwarya Patil - avatar