+ 3
How to declare the characeter if of A- because char letter = 'A-' is error?
6 ответов
+ 5
Just use System.out.print("A-");
This can be useful when do coding of selection
+ 3
char is only valid for single characters.
+ 2
You should use String instead of char
+ 1
Use string if it is more than one letters, char is only supporting one letter value.
String word = "A-";
+ 1
Alternatively Also you can use char array to store those two...
char[] word={'A', '-'};
+ 1
हक