我是靠谱客的博主 复杂灰狼,这篇文章主要介绍not a statement java_java 编译错误 not a statement,现在分享给大家,希望可以做个参考。

importjava.util.Scanner;publicclassMain{intcount,n,k,pa,pb=0;Arraylista=newArraylist();Arraylistb=newArraylist();Scannersc=newScanner(System.in);intn=sc.nextInt();publicv...

import java.util.Scanner;

public class Main{

int count,n,k,pa,pb=0;

Arraylist a=new Arraylist();

Arraylist b=new Arraylist();

Scanner sc = new Scanner(System.in);

int n = sc.nextInt();

public void working(){

for (int i=1; i++; i<=n);

a.add(sc.nextInt());

for (int j=1; j++; j<=n)

{

b.add(sc.nextInt());

}

while ((pa!=pb) || (pa==0) )

{

pa=+a.get(count);

pb=+b.get(count);

count++;

}

System.out.print(count);

}

}

这是我写的代码,编译结果是

Status: Compilation error

Your program failed to compile.

We received the following errors:

/grader/1/225444/compile/Main.java:12: error: not a statement

for (int i=1; i++; i<=n);

^

/grader/1/225444/compile/Main.java:16: error: not a statement

for (int j=1; j++; j<=n)

^

2 errors

求大神解答!

展开

最后

以上就是复杂灰狼最近收集整理的关于not a statement java_java 编译错误 not a statement的全部内容,更多相关not内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(129)

评论列表共有 0 条评论

立即
投稿
返回
顶部