Advertisements
Advertisements
Question
Distinguish between Character and Boolean literal.
Distinguish Between
Solution
S. No. | Character Literal | Boolean Literal |
1. | Character literals are constants with alphanumeric values. | In Java, specific literals can be used to determine if a logical condition is met. |
2. | It's secured within single quotes. | Quotes never bound them. |
3. | Example: 'a', 'D', '3'. | Example: true, false. |
shaalaa.com
Is there an error in this question or solution?
Chapter 1.03: Values and Data Types - EXERCISES [Page 33]