Good evening, can anyone tell me what’s wrong with this media program?

Asked

Viewed 18 times

0

Giving static class error for some reason, someone can help?

class Media{
public int Media(int a, int b){
    return (a + b) / 2;
}
public double Media2(double a, double b){
    return (a + b) / 2;
}

public static void main(String[] args) {
    System.out.println(Media(10, 2));
}

}

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.