Sunday, 22 January 2017

ASSIGNING THE REQUIREMENTS TO THE VARIABLE

In every programming if we want to assign the requirement to the variable, when we have 2 ways

1. compile time - In this process before compiling the application directly we fixed the requirement to the variable. Example - int age=25; String name="rakesh" etc.
Note : In project development whenever constant requirement are their from project clients then we will go for compile time syntax.

2. Run time - In this process before compiling the application just we are declaring / defining empty variable, and for this we are assigning requirements at runtime / execution time.
Note : In project development whenever different requirements (every time changing requirements) are their from project clients then we will go for runtime syntax.


In java if we want to assign the requirements at runtime then we have 3 approaches which we will learn in the upcoming tutorials -

1. using Scanner class of methods.
2. using BufferedReader class of methods.
3. command line arguments concepts.

No comments:

Post a Comment