Ad

Saturday, January 30, 2016

Codecademy Learn Java Tutorial walkthrough 5 Variables

Like all other coding languages, Java uses variables to store values like 19, true , 'A', "Hello". Java variables are like storage boxes with a label. You must specify the type of the variable and only store values allowed by the type. It's a strict storage system, example you absolutely cannot put jackets in the shoe box. Java is very OCD. For example char myVar = 'Xyz'; will cause Java to error out because char type only allows one character! 

int myNumber = 42;
boolean isFun = true;
char movieRating = 'A';

Also note that the variable names are in camel case meaning that the first letter of  alternating word is capitalized, example justLikeThis! It's more readable than justlikethis. Though probably less readable than just_like_this. 

Why is it called camel case? It looks like the camel back "camelBack".

3 comments:

  1. I have read your blog its very attractive and impressive. I like it your blog.

    Java Training in Chennai Core Java Training in Chennai Core Java Training in Chennai

    Java Online Training Java Online Training Core Java 8 Training in Chennai java 8 online training JavaEE Training in Chennai Java EE Training in Chennai

    ReplyDelete
  2. Java Training Institutes Java Training Institutes Java EE Training in Chennai Java EE Training in Chennai Java Spring Hibernate Training Institutes in Chennai J2EE Training Institutes in Chennai J2EE Training Institutes in Chennai Core Java Training Institutes in Chennai Core Java Training Institutes in Chennai

    Hibernate Online Training Hibernate Online Training Hibernate Training in Chennai Hibernate Training in Chennai Java Online Training Java Online Training Hibernate Training Institutes in ChennaiHibernate Training Institutes in Chennai

    ReplyDelete
  3. Very impressive, Nice blog about java, Thanks for sharing your valuable info, it is very easy to understand, really more helpful for me.
    Java Training in velachery |Java Training institute in velachery

    ReplyDelete

MATLAB eBook on Machine Learning

Working on graduate study work? MATLAB now offers a free eBook on Machine Learning. Great resource for those in the academia. https://www....