Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java max from 3 parameters

// Math.max() works with only 2 parameters
// If you want to check more parameters, you can nest the method
int a = 10;
int b = 20
int c = 30;

return Math.max(a, Math.max(b,c));
 
PREVIOUS NEXT
Tagged: #java #max #parameters
ADD COMMENT
Topic
Name
8+6 =