Java Programming tutorial with officialhord - Variable types [char]

in utopian-io •  7 years ago  (edited)

sample.jpg

char

This is a data type in java that allows you to store only one character alphanumeric data, as it is just 2 bytes in size, storing more would be a practically impossible.

How to use char

To declare a variable of data type char, your code should look like this;
char x = 'A';
char d = 'x'
char (name of the variable) = '(character to be stored)'

This would work on any java programming platform.

Try not to use more than one character when using the char data type and if you want to use more than one, you can declare that as an array of char which would be visited in the next tutorial.
Thanks for following.



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

I definitely recommend Eclipse for Java SE 7. Practice with error-free code writing wishes. Link is down and easy to download.

http://www.eclipse.org/downloads/eclipse-packages/

lol... cool

Your contribution cannot be approved yet because it is not as informative as other contributions. See the Utopian Rules. Please edit your contribution and add try to improve the length and detail of your contribution (or add more images/mockups/screenshots), to reapply for approval.

You may edit your post here, as shown below:

You can contact us on Discord.
[utopian-moderator]

thanks

Your contribution cannot be approved because it does not follow the Utopian Rules.

You can contact us on Discord.
[utopian-moderator]