Can we use predefined Class/Interface name as identifier?

class Identifier7
{
public static void main(String alt[])
{
int String=20;
int Runnable=30;
System.out.println(String);
System.out.println(Runnable);
}
}
/*
O/P:- 20 30
Explanation :- All predefined java class names and inteface names we can use as identifier.
Eventhough it is legal to use predefined class and interface name as identifier
it is not good programming practice.
*/

0 comments: