0
Can we increment or decrement the characters in java?
How they are incrementing ? what if we increment 'z'?
7 ответов
+ 2
Each character is stored as a number. a-z are next to each other, so incrementing a gives b etc.
z has value 122 in ASCII, incrementing should yield { with value 123
https://code.sololearn.com/cJgy1JYCfgv8/?ref=app
+ 1
Why do not you just try?)
+ 1
thank you very much . It is very helpful
+ 1
look at ASCII
http://www.pld.ttu.ee/~marek/PA_R4/asciiful.gif
It will be |
0
I have tried , characters were incremented .But when we increment 'z' , output is empty.Why so?
0
how do you print? it would be desirable to see the code. Example:
public class Program
{
public static void main(String[] args) {
char c = 'z';
c++;
System.out.println(c);
}
}
0
if we increment this '{' then what the output mean?