com.xu.method.Demo01
作者:互联网
package com.xu.method;
public class Demo01 {
//main方法,public static是修饰符,
// void是返回值,返回为空就是不返回的意思;
public static void main(String[] args) {
// int sum=add(1,2);
// System.out.println(sum);
test();
}
//加法
public static int add(int a,int b){
return a+b;
}
public static void test(){
for (int i = 0; i <=1000; i++) {
if(i%5==0){
System.out.print(i+"\t");//
/*\t是转移字符,此处也可以用" ",中间是空格来实现;
*/
}
if (i%15==0){ //换行
System.out.println();
//System.out.println("\n"); \n是换行的意思
//Println是输出完会换行;print输出完不会换行
}
}
}
}
"D:\Program Files\Java\jdk1.8.0_281\bin\java.exe" "-javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2021.1\lib\idea_rt.jar=63811:D:\Program Files\JetBrains\IntelliJ IDEA 2021.1\bin" -Dfile.encoding=UTF-8 -classpath "D:\Program Files\Java\jdk1.8.0_281\jre\lib\charsets.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\deploy.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\ext\access-bridge-64.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\ext\cldrdata.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\ext\dnsns.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\ext\jaccess.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\ext\jfxrt.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\ext\localedata.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\ext\nashorn.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\ext\sunec.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\ext\sunjce_provider.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\ext\sunmscapi.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\ext\sunpkcs11.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\ext\zipfs.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\javaws.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\jce.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\jfr.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\jfxswt.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\jsse.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\management-agent.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\plugin.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\resources.jar;D:\Program Files\Java\jdk1.8.0_281\jre\lib\rt.jar;C:\Users\徐文昭\Desktop\JavaSE\out\production\基础语法" com.xu.method.Demo01
0
5 10 15
20 25 30
35 40 45
50 55 60
65 70 75
80 85 90
95 100 105
110 115 120
125 130 135
140 145 150
155 160 165
170 175 180
185 190 195
200 205 210
215 220 225
230 235 240
245 250 255
260 265 270
275 280 285
290 295 300
305 310 315
320 325 330
335 340 345
350 355 360
365 370 375
380 385 390
395 400 405
410 415 420
425 430 435
440 445 450
455 460 465
470 475 480
485 490 495
500 505 510
515 520 525
530 535 540
545 550 555
560 565 570
575 580 585
590 595 600
605 610 615
620 625 630
635 640 645
650 655 660
665 670 675
680 685 690
695 700 705
710 715 720
725 730 735
740 745 750
755 760 765
770 775 780
785 790 795
800 805 810
815 820 825
830 835 840
845 850 855
860 865 870
875 880 885
890 895 900
905 910 915
920 925 930
935 940 945
950 955 960
965 970 975
980 985 990
995 1000
Process finished with exit code 0
标签:Files,jdk1.8,Java,jar,Demo01,Program,281,com,method 来源: https://www.cnblogs.com/xunzhao26/p/14807065.html