继续收到错误插入变量声明以完成我的Java程序的VariableDeclaration [英] Keep getting an error insert Variable Declaration to complete VariableDeclaration on my Java program
本文介绍了继续收到错误插入变量声明以完成我的Java程序的VariableDeclaration的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
public class Trying
{
public static void main(String [] args)
{
nestedFor;
int i = 0;
}
public static void nestedFor(int)
{
int i = 0;
int h = 0;对于(int = h; i = 6; h ++)
(int = i; i< = 4; i ++)
System.out.println ,3\" );
}
}
解决方案
您的意思是显示测试1,2,35×7 = 35次,您的代码应如下所示:
public class Trying
{
public static void main(String [] args)
{
nestedFor();
}
public static void nestedFor()
{
int i = 0;
int h = 0; (h = 0; h <= 6; h ++)
(i = 0; i <= 4; i ++)
System.out.println ,3\" );
}
}
Keeping getting errors and I am new to Java. I keep getting errors about Variable Declaration needed. Advice?
public class Trying
{
public static void main(String[] args)
{
nestedFor;
int i =0;
}
public static void nestedFor(int)
{
int i = 0;
int h =0;
for (int = i; i<=4; i++)
for (int = h; i <=6; h++)
System.out.println ("Testing 1,2,3");
}
}
解决方案
If you mean showing "Testing 1,2,3" 5×7=35 times, your code should look like this:
public class Trying
{
public static void main(String[] args)
{
nestedFor();
}
public static void nestedFor()
{
int i = 0;
int h =0;
for (i=0; i<=4; i++)
for (h=0; h <=6; h++)
System.out.println ("Testing 1,2,3");
}
}
这篇关于继续收到错误插入变量声明以完成我的Java程序的VariableDeclaration的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文