Working with variables

So, I have data in its proper place holders in memory, they have meaningful names, is that all ?
Not at all, if you don't do anything with the data, you are basically wasting precious memory.
Without proper modification, variables are useless.

Well, so how do I modify the memory ?
No, you can not modify the memory, you need to provide instructions to computer to modify the memory for you.

Instructions ? Again that CMP, ADD, SUB ?
No. In High Level Languages, you don't have to instruct your computer using these, you can use English like language to instruct your computer.

Wow, that's so cool, I will just tell my computer, 'ADD 2 and 2, it will give me 4'
No, its not like that. Like English has its own grammar and vocabulary, Java also has its own grammar and vocabulary.

So, I have to learn another language :(
Unfortunately, YES. You have to learn new grammar and vocabulary.

OK, let me check out, what are there in it :|
Java does not have a big dictionary, neither it has lots of words to remember. It has a very little subset of English and some special notation to use.

That's great. So, where is the dictionary ?
I will show you the dictionary of Java. In programming languages, these are known as keywords. Each keyword does a specific job. Throughout all your Java career, you will need these keywords. As we will explore more, we'll gradually get accustomed with each of these keywords.

Here is a list of keywords in the Java programming language. You cannot use any of the following as identifiers (variable and method names) in your programs. The keywords const and goto are reserved, even though they are not currently used.
true,false, and null might seem like keywords, but they are actually literals; you cannot use them as identifiers in your programs.
abstractcontinuefornewswitch
assert***defaultgoto*packagesynchronized
booleandoifprivatethis
breakdoubleimplementsprotectedthrow
byteelseimportpublicthrows
caseenum****instanceofreturntransient
catchextendsintshorttry
charfinalinterfacestaticvoid
classfinallylongstrictfp**volatile
const*floatnativesuperwhile
*not used
**added in 1.2
***added in 1.4
****added in 5.0

For advanced readers, this link can be useful for a reference of all Java keywords,

Only, these few ? Are you kidding me ?
No, not at all I'm kidding you. Java only has these few keywords.

So, how do I manage to write applications with only this small set of words ?
Dear reader, please use the term 'keyword'.
Any Java program in the world, does not have any keyword out of this set. Whether you are writing a music player or writing a railway reservation system or writing a highly secured banking application or trying to create your own Java based game, you will never get a chance to use any keyword out of this list.
Now, its time to answer your question. Its actually you, who defines the functionality of an application. Its your creativity and imagination, which determines how the application should work an not Java. Java is only a companion to achieve your job in a smooth way.

Really ?
Yeah, its only you who determines the flow of data and how to apply modification rules on them.

Hmmm...(Awww...). Great to know about it, I think, I will be writing a good application which will do all my mathematical stuffs in a single go !!!
Well, get a hold on your thoughts and creativity right now, you have to learn some more to instruct your computer to do your tedious jobs.

Prev     Next
Palash Kanti Kundu

1 comment:

  1. I presume this advice will be very helpful for all people who wanna start to learn Java. I wish I had such nice tips when I was only beginner in this sphere cause it can show u the right way of learning. I dont work as a coder anymore, but I remember that I always loved to read this site about transient in java https://explainjava.com/java-transient/ when I have a free time.

    ReplyDelete