Hi praveen
When you compile this code , you got the exception
reference to str is ambiguous, both variable str in testproject.gen1 and variable str in testproject.inter match
System.out.println(str);
1 error
Because str have both class and interface.
You should mentioned, whether str should be the interface or class.