I'm New to Java
My first semester, having some trouble with a particular assignment.
My program compiles fine,
publicclass NewYork
{
publicstaticvoid main(int street,int avenue){
if(street < 0 || avenue < 0){
System.out.println("Invalid. Usage: NewYork <streetaddress><avenue>");
}
else{
int x = street/10;
int y = x/2;
int fstreet = 0;
if(avenue == 1){
fstreet = y + 3;}
if(avenue == 2){
fstreet = y + 3;}
if(avenue == 3){
fstreet = y + 10;}
if(avenue == 4){
fstreet = y + 8;}
if(avenue == 5){
fstreet = y + 13;}
if(avenue == 6){
fstreet = y - 12;}
if(avenue == 7){
fstreet = y + 12;}
if(avenue == 8){
fstreet = y + 10;}
if(avenue == 9){
fstreet = y + 13;}
if(avenue == 10){
fstreet = y + 14;}
System.out.println("The nearest cross street number is " + fstreet);
}
}
}
Ignore the random math, its just the assignment.
But, when I try to run it, I get this error message.
Exception in thread "main" java.lang.NoSuchMethodError: main
What do I need to do?

