Home Segments Top Top Previous Next

108: Mainline

You must specify the data type of each parameter individually, because data types in parameter declarations, unlike data types in variable declarations, do not propagate across commas. Thus, the following is wrong:

                                  *-- BUG: Data type does not propagate 
                                  v  
                                ----------- 
public static int movieRating (int s, a, d) {  
 ... 
}