方法printf(java.lang.String,java.lang.String)位置:类 java.text.Format       Format.printf("%c","#");

解决方案 »

  1.   

    import java.io.*;
    import java.text.*;
    import java.util.Locale;
    public class ContinueLabelTest
    {
    public static void main(String[] args)
    {
    nextRow:
    for(int row=0;row<5;row++)
    {
    for(int column=0;column<10;column++)
    {
    if(column>row)
    {
    System.out.println();
    continue nextRow;
    }
    Format.printf("%c","#");
    }
    }
    }
    }
    我的源代码是这样的
      

  2.   

    public class ContinueLabelTest {
    public static void main(String[] args) {
    nextRow: for (int row = 0; row < 5; row++) {
    for (int column = 0; column < 10; column++) {
    if (column > row) {
    System.out.println();
    continue nextRow;
    }
    System.out.format("%c", '#');//这样就可以输出啊!

    }
    }
    }
    }不明白你要干什么?
      

  3.   

    #为什么要用单引号才能输出呢?它不能作为string吗?我是初学者,能解释下吗?
      

  4.   

    Format.printf("%c","#"); //%c说明是字符,所以用'#',%s是字符串,用"#"
    注意一下字符和字符串的区别