-4
コンパイルしようとするとエラーが発生します。私は私が持っていた他のエラーを修正することができました(私は、彼らがもはや少なくともリストしていないと思う)。私はそれを理解しようとしましたが、明らかに私はその問題を理解していません。発生 エラー:それはコンパイルエラー:指定した種類に適用できません
pastpresentfuture = determine_past_present_future(User_month, User_day, User_year);
と呼ばれているのはここ
PastPresentFuture.java:34: error: method determine_past_present_future in
class PastPresentFuture cannot be applied to given types;
determine_past_present_future(pastpresentfuture);
^
required: int,int,int
found: String
reason: actual and formal argument lists differ in length
であり、これは、関連するコード
public static String determine_past_present_future(int a, int b, int c) {
int Current_year = 2017;
int Current_month = 9;
int Current_day = 10;
String date;
if ((c < Current_year) || (c > Current_year)) {
date = "not this year";
} else if ((a < Current_month)) {
date = "in an earlier month this year";
} else if ((a > Current_month)) {
date = "in a later month this year";
} else if ((a == Current_month)) {
date = "this month";
}
return date;
}
編集です*私は、メソッド呼び出しの間を台無しにそれを考え出しましたハリケーンの更新を見て、間違った場所に集中しすぎて修正する必要がなくなりました。エラーとして
メソッドを呼び出すコードを投稿する必要があります。 – Ravi
'pastpresentfuture'とは何ですか?コンマ区切り記号を忘れましたか? – shmosel
無関係ですが、 'else if {'について知りませんでしたか? –