Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

veer jain

Greenhorn
+ Follow
since Mar 19, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by veer jain

Hey Vaibhav, in your code you are actually doing both, init and decl inside for loop....

my question is why cannot we mix it, in the sense, one is declared outside and init inside and other var decl and init inside ??

its an example code to understand the functionality, its not about whether code is making sense or not...i just want to know why is this decl/initn designed like this in java ?
Why can't you mix declarations with initialization ? why is it designed like this ?

Also when you want to throw some user defined exception , which you might have created for your application specific purpose, in those cases throws is very useful as it will make that method throw an instance of your user defined exception class...
Why does the Floating Point numbers does NOT produce the dividebyzero arithmatic exception ??



The above code runs fine, But Why ?? Why is it designed like that ?? It should through an exception...

Any Thgoughts ?

Regards
Veer