public class Foo { public static void main(String[] args) { float f; System.out.println(f); } }
The print statement causes
Hi guys solution is simple. the values that are stored on the heap memory are initialized by the compiler based datatype but local variables are stored on stack memory so we have to inialize it explictly.