method Math.min(int,int) is not applicable (actual and formal arguent lists differ in length)method Math.min(long,long) is not applicable (actual and formal argument lists differ in length)method Math.min(float,float) is not applicable(actual and formal a
时间: 2024-04-16 22:27:15 浏览: 28
rgument lists differ in length)method Math.min(double,double) is not applicable (actual and formal argument lists differ in length)
The error message you are seeing indicates that you are trying to call the `Math.min()` method with an incorrect number of arguments.
The `Math.min()` method is overloaded, meaning it has multiple versions that accept different argument types. In this case, there are four versions: `int`, `long`, `float`, and `double`. Each version of the method accepts two arguments of the corresponding type and returns the smaller of the two values.
To fix the error, make sure you are calling the `Math.min()` method with the correct number and type of arguments. For example, if you want to find the minimum of two integers, you should call `Math.min()` with two `int` arguments:
```java
int min = Math.min(5, 10);
```
If you are working with different types of arguments, such as `long`, `float`, or `double`, make sure to provide two arguments of the appropriate type:
```java
long minLong = Math.min(100L, 200L);
float minFloat = Math.min(3.14f, 2.71f);
double minDouble = Math.min(3.14, 2.71);
```
By providing the correct number and type of arguments, you should be able to resolve the error.
相关推荐
![js](https://img-home.csdnimg.cn/images/20210720083646.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)