package lianxiti;

public class Print {
    void output(int x)
    {
        if(x==1)
        {
            System.out.println("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
        }
        else if(x==2)
        {
            System.out.println("abcdefghijklmnopqretuvwxyz");
        }
        else
        {
            System.out.println("您输入有误");
        }
    }

}
package lianxiti;

public class TestClass {

    public static void main(String[] args) {
        // TODO 自动生成的方法存根

        Print p1 = new Print();
        p1.output(2);
    }

}

java  类和对象的小练习,输出英文字母表大小写

相关文章:

  • 2021-11-28
  • 2022-12-23
  • 2021-11-24
  • 2021-09-10
  • 2022-12-23
  • 2021-07-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-18
  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2021-08-04
相关资源
相似解决方案