How to get max value of an integer in Java

1 Answer

0 votes
public class MyClass {
    public static void main(String args[]) {
        int max = Integer.MAX_VALUE;
        
        System.out.println(max);
    }
}




/*
run:

2147483647

*/

 



answered Apr 3, 2016 by avibootz
edited Nov 22, 2023 by avibootz

Related questions

4 answers 378 views
1 answer 279 views
1 answer 251 views
1 answer 211 views
211 views asked Nov 5, 2021 by avibootz
1 answer 203 views
1 answer 206 views
1 answer 215 views
...