public class helloworld { public static void main(string[] args) { system.out.println("hello world!"); } } 首先编译,进入E盘,输入“e:”然后enter 接着输入 Javac helloworld.java 就是这个5行的小程序,出现了3个错误 1:错误:类helloworld是公共的,应在名为 helloworld.java 的文件中声明 public class hellow
1. 利用循环打印如下图形 ***** **** *** ** * public class Main { public static void main(String[] args) { // TODO Auto-generated method stub int i = 5; while (i >= 0) { for (int j = i; j > 0; j--) System.out.print("*"); System.out.println(); i--; } }