CUET PG 2021 Computer PYQ — Which of the following codes is used in Java to represent charact… | Mathem Solvex | Mathem Solvex
Tip:A–D to answerE for explanationV for videoS to reveal answer
CUET PG 2021 — Computer PYQ
CUET PG | Computer | 2021
Which of the following codes is used in Java to represent characters?
Choose the correct answer:
A.
ASCII code
B.
Unicode
(Correct Answer)
C.
Byte code
D.
None of the above
Correct Answer:
Unicode
Explanation
Solution
Java mein characters ko represent karne ke liye Unicode standard ka istemal kiya jata hai.
Explanation
Java ko "Internationalization" (i18n) ko dhyaan mein rakhkar design kiya gaya tha. Jahan purani languages sirf English characters (ASCII) tak mahdood thi, wahan Java duniya ki har bhasha ke aksharon ko handle kar sakta hai.
Size: Java mein ek char variable ka size hamesha 16 bits (yaani 2 bytes) hota hai.
Total Capacity: Kyunki yeh 16 bits use karta hai, isliye yeh kul itne characters represent kar sakta hai:
Total Characters=216=65,536
Range: Iski numerical range niche diye gaye formula se darshayi jati hai:
Range=[0,65535]
Explanation
Solution
Java mein characters ko represent karne ke liye Unicode standard ka istemal kiya jata hai.
Explanation
Java ko "Internationalization" (i18n) ko dhyaan mein rakhkar design kiya gaya tha. Jahan purani languages sirf English characters (ASCII) tak mahdood thi, wahan Java duniya ki har bhasha ke aksharon ko handle kar sakta hai.
Size: Java mein ek char variable ka size hamesha 16 bits (yaani 2 bytes) hota hai.
Total Capacity: Kyunki yeh 16 bits use karta hai, isliye yeh kul itne characters represent kar sakta hai:
Total Characters=216=65,536
Range: Iski numerical range niche diye gaye formula se darshayi jati hai: