I have code where a variable name is identical to the class name. I.e.:
class Foo {
static public void main(String[] args) {
Integer Foo;
Foo.main(args);
}
}
How can I call the main-method without renaming the variable or the class?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If it’s not in the default package you could refer to it via the package name also, e.g.:
or you can simply refer to main without the class name, e.g.: