answersLogoWhite

0

Different languages use different size types for different reasons. In this case, the difference is between ASCII and Unicode. Java characters use 2-bytes to store a Unicode character so as to allow a wider variety of characters in strings, whereas C, at least by default, only uses 1 byte to store a character.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is the ' ' called in java?

' ' would be the character for a space in Java.


How do you store a character in a variable?

In Java a primitive data type called 'Char' is used to store a single character of text.Char myChar = "a";


Can a character in java apply in JOptionPane?

no!!


What is java string?

array of character data type which is terminated by null character


How do you increase java heap size on mobile phones?

How do increase java heap space on mobile


What are the requirements to download a java arraylist?

The requirements to download a java arraylist are a pc with java software installed. A java arraylist is used to store a group of elements in a specific order.


Is there a bright future in java?

Yes, there is a very bright future in store for Java. It is very important to PC's.


How much space does java take up?

12


Character use only one byte why Java use two byte for character?

The number of bytes used by a character varies from language to language. Java uses a 16-bit (two-byte) character so that it can represent many non-Latin characters in the Unicode character set.


What is the Size of a java class?

Java classes can have practically any size. It all depends on how much information they store.


Why does java use unicode?

Transform character s into numbers (binary)


Is space a token in java?

By default, no. The StreamTokenizer class ignores spaces as white space.If you need to make it a token, which you didn't specify, you can modify the default behavior by calling the function ordinaryChar (int ch), where ch is the character you would want to be treated as a token.From the Java SE 6 API documentation:ordinaryCharpublic void ordinaryChar(int ch) Specifies that the character argument is "ordinary" in this tokenizer. It removes any special significance the character has as a comment character, word component, string delimiter, white space, or number character. When such a character is encountered by the parser, the parser treats it as a single-character token and sets ttype field to the character value. Making a line terminator character "ordinary" may interfere with the ability of a StreamTokenizer to count lines. The lineno method may no longer reflect the presence of such terminator characters in its line count.Parameters:ch - the character.