Home > DeveloperSection > Forums > Can anybody elaborate the difference between “Char” and “String” at Java
Lady Bird Johnson
Lady Bird Johnson

Total Post:20

Posted on    October-14-2013 3:28 AM

 Java Java 

 1 Reply(s)
 981  View(s)
Rate this:

 I can't understand which is the difference between the variable type "char" and "string". For example, there is a difference between "int" and "short", the bytes at the memory and the area of numbers that they have.

But what is the difference between "char" and "string"? Expect that "char" use (') and "string" (").

Kate Smith
Kate Smith

Total Post:24

Posted on    October-14-2013 3:59 AM

char is one character. String is zero or more characters.

char is a primitive type. String is a class.

Don't want to miss updates? Please click the below button!

Follow MindStick