Use of 'auto' keyword in Java


Harshit Maheshwari
Computer Science, IIT-Kanpur

Developers often have to remember the syntax of code which diverts their attention from program logic. We propose the use of 'auto' keyword in JAVA for objects/variables whose type can be determined by the compiler automatically. We modified the existing Java grammar rules and derived rules for type-inference and type-unification for return type of functions and for handling class inheritance.