0

Do variables contain garbage in Java ?

14th Jul 2016, 4:18 PM
ABDUL SOHAIL
ABDUL SOHAIL - avatar
6 Answers
+ 1
Yes they are initialized at first with a garbage value I think
14th Jul 2016, 4:52 PM
Etc Etc
Etc Etc - avatar
+ 1
No.. it will give a compilation error since it has not been initialised
17th Jul 2016, 8:08 AM
Sanket
Sanket - avatar
0
it's not garbage value.. it's initial value :p
14th Jul 2016, 6:08 PM
Pulkit Goswami
0
there is no garbage value in java althought there may be initialized the variables
14th Jul 2016, 7:07 PM
Satyam Agrawal
Satyam Agrawal - avatar
0
No java dsnt hve a garbage value... it will show compile time error
15th Jul 2016, 6:26 AM
soumik
0
No there is no garbage value in Java . Even variables in class are initialize to 0, if you don't initialize them.
6th Aug 2016, 10:40 AM
Suyash Kathar
Suyash Kathar - avatar