Answer Posted / mihirdash
first take an example of c/c++,here the decaration and initialization is the programmer responsibility if not it gives the garbage value.but in java every thing is taken by jvm.we can declare any number of variable but it should be initialized.otherwise if we are going to use the uninitialized varibles the java compiler gives error.so there is no garbage value in java.
and if youu are created a object the keyword new is assigned default value during crreation of object
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is identifier with example?
State the merge-sort principle and its time complexity.
What is a local block?
What are predicates in java 8?
How can you say java is object oriented?
What is java command?
what is use of functional interface in java 8?
What is the core java?
What are facelets templates?
How the interruptible method gets implemented?
What is the difference between and ?
What is static block?
Can an integer be a string?
What is a variable declaration?
What is the static keyword?