//while循环 public class A4 { /*计算0到100的奇数和偶数的和 用while或for循环输出1-1000之间能被5整除的数,并且每行输出三个 打印九九乘法表 */ public static void main(String[] args) { //计算0到100的奇数和 ...
分类:
其他好文 时间:
2021-03-10 13:26:39
阅读次数:
0
//用while或for循环输出1-1000之间能被5整除的数,并且每行输出三个 public class A5 { public static void main(String[] args) { for (int i = 1; i <= 1000; i++) { if (i%5==0){ Sys ...
分类:
其他好文 时间:
2021-03-10 13:26:22
阅读次数:
0
顺序语句 案例 package com.bk201.struct; public class ShunXuDemo { public static void main(String[] args) { System.out.println("H"); System.out.println("e"); ...
分类:
其他好文 时间:
2021-03-10 13:13:09
阅读次数:
0
public class HttpServerStart { public static volatile boolean flag = false ; public static void start() { int port = 8099; EventLoopGroup bossGroup = ...
分类:
Web程序 时间:
2021-03-10 12:59:52
阅读次数:
0
在学习过程中敲如下的一段代码: public class example4{ public static void main(String[] args){ int n=9; while(n>6){ System.out.println("n = "+n); n--; } } } 文件名为 exam ...
分类:
编程语言 时间:
2021-03-09 13:56:20
阅读次数:
0
数组声明创建 声明数组变量,两种方法 int[] num; int num[]; 使用 new 创建数组 num = new int[arraySize]; 可以同时进行声明和创建数组 int[] num = new int[arraySize]; 数组初始化 静态初始化 int[] a = {1, ...
分类:
编程语言 时间:
2021-03-09 13:55:36
阅读次数:
0
方法如下: 1. 写好功能工具类,如: public class Hello { public static void main(String[] args) throws Exception { Hello hello = new Hello(); hello.sayHello("word. bi ...
分类:
编程语言 时间:
2021-03-09 13:53:56
阅读次数:
0
代码例子如下 public class Father{ private int i = test(); private static int j = method(); static{ System.out.print("(1)"); } Father(){ System.out.print("(2 ...
分类:
其他好文 时间:
2021-03-09 13:44:24
阅读次数:
0
package Demo; import java.util.*; import java.io.*; //import org.apache.*; import org.apache.commons.io.FileUtils; public class loop { public static v ...
分类:
编程语言 时间:
2021-03-09 13:29:12
阅读次数:
0
Java的数组 public class Demo18 { public static void main(String[] args) { int[] nums;//1.声明一个数组 nums = new int[5];//2.创建一个为5的数组 //通常可以合为一步 int[] nums = n ...
分类:
编程语言 时间:
2021-03-09 13:14:21
阅读次数:
0