ethod getAvg in class Main cannot be applied to given types; int f=getAvg(d); ^
时间: 2024-02-15 12:43:06 浏览: 20
This error message indicates that there is an issue with the arguments passed to the getAvg method in the Main class. The method is expecting a different type of argument than what is being passed.
The method getAvg may be defined to take in an array of integers as an argument, but the code is passing a single integer variable d instead. To resolve the error, the code should be modified to pass an array of integers to the getAvg method instead of a single integer variable.
相关问题
ethod Not Allowed
"Method Not Allowed"是一个HTTP状态码,表示请求的方法不被允许或支持。在引用中提到,当出现"Method Not Allowed"时,一般是因为URL响应不支持一定的操作,比如POST请求。解决这个问题的方法是在相关的URL路由中明确指定支持的方法,如在代码中使用`methods=['GET', 'POST']`来定义支持GET和POST请求。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [Method Not Allowed- The method is not allowed for the requested URL](https://blog.csdn.net/ldhshao/article/details/99699417)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]