also i wrote this program, the value of c gets overwritten, class hello_world { // Declared Instance Variable public String geek; public int i; public Integer I; public static int c = 188; public static void main(String[] args) { int c=68;
if it is static it should have been 188 only, or error should have been there for declaring another variable with same name? clarify.
java code
Vaishali Singla is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.