The Best way to predict your future is to create it - Every great individual common man
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Originally posted by Jothi Shankar Kumar Sankararaj:
double i = 1;
double x = 1;
it works fine, but when we club the declarations like,
double i, x = 1, it says the variable might not be initialized in the expression,x+=i;
but runs fine for x = x + 1;
The Best way to predict your future is to create it - Every great individual common man
code:
int x,i=1;
doesn't means that x is initialized.
that means you are writing same as
code:
int x;
int i=1;
Hope it helps you out.
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Originally posted by Jothi Shankar Kumar Sankararaj:
Hi Sharma Ji,
Your Quote,
Then how come,
double i, x = 1;// Put your declarations for x and i here
x = x + i; // Must be LEGAL
x += i; // Must be ILLEGAL
Works out?? As per your post, I'm doing like,
double i;
double x = 1;
x = x + i; //How this becomes legal now??? i is still not initialized...
Any thoughts on that??
The Best way to predict your future is to create it - Every great individual common man
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
<a href="http://www.dantheman.pl" target="_blank" rel="nofollow">http://www.dantheman.pl</a>
Originally posted by Ganesh Pujar:
Any explenations for the second? please.
The Best way to predict your future is to create it - Every great individual common man
The Best way to predict your future is to create it - Every great individual common man
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |