Assignment 2

Create a new java file called "assignment2" and copy the following code into it -

public class assignment2{
    public static void main(String args[]){
        int bigNumber = max(8,4,9);
        System.out.println(bigNumber);
    }
    public static int max(int a, int b, int c){
        int bigNumber = 0;
        // put your if statement here!
        return bigNumber;
    }
}

Your job is to find the bigest value out of the three variables. You must use an if statement and you MUST NOT hard code any numbers. You should -

 

 
Basics
Menu
Search