‫In this video, we'll learn about the last primitive data type.
‫Imagine you have a magical box called character.
‫This is special box can hold only one thing at a time, and the thing it holds is always a single letter
‫number or symbol.
‫It's like a tiny treasure chest that keeps little characters safe.
‫In Java, we use the char data type or character data type to talk about this magical box.
‫We write the word char.
‫To tell Java that we want to use this special box that holds a single character.
‫Let's see how it looks in code.
‫We start with the card keyword and specify the name of this character and the equal sign.
‫And here with a single quotation, I'll include the value.
‫In this example, we created a magical box called My Character and we put the letter A inside it.
‫You see A is a single character, so it fits perfectly inside the character box.
‫You can also put other letters, numbers or symbols inside the character box.
‫So for example, I'll start with character.
‫My number equal to and I can include it include.
‫Number seven inside it.
‫Okay.
‫Only one single number.
‫This is a letter.
‫This is a number.
‫And now let's create a variable of type character.
‫I'll name it as my symbol that holds a symbol dollar sign.
‫You can even use escape sequences to put special characters like a new line or a tab inside the car
‫box.
‫So for example, car new line equal to.
‫And the new line is in Java.
‫This backslash and letter n this refers for the new line in Java character tab equal to backslash T
‫which refers for the new tab.
‫The character data type is like a magical container that holds a little character.
‫You can use it when you only need to work with individual letters, numbers or special symbols in your
‫Java program.
‫It's a small but essential part of Java language.