What is default value of local variables ?
Answer : Local variables stored on the stack and aren’t actually created until they have been initialized. If a local variable isn’t used then it doesn’t go on the stack. Member variables, however, are allocated in the heap, and so have a default placeholder (null reference or default primitive).
Please see below default values:
|Data Type||Default Value (for fields)|
|String (or any object)||null|