public class ThreadDemo { //1.定义一个静态变量,因为静态变量是线程共享的 public static int count = 0; //2.定义一个自增的方法 public static void add() { try { Thread.sleep(1);//让程序睡 ...
分类:
编程语言 时间:
2021-05-24 02:11:00
阅读次数:
0
HelloWorld 随便新建一个文件夹,存放代码 新建一个Java文件 文件后缀名为.java Hello.java 【注意点】系统可能没有显示文件后缀名,需要手动打开 编写代码 public class Hello{ public static void main(String[]args){ ...
分类:
其他好文 时间:
2021-05-24 01:16:13
阅读次数:
0
static void Main(string[] args) { List<Man> list = new List<Man>(); for (int i = 0; i < 10; i++) { Man d = new Man(); d.Age = i ; d.Name = i.ToString( ...
分类:
其他好文 时间:
2021-05-24 01:06:23
阅读次数:
0
请求转发: 一种在服务器内部的资源跳转方式 1. 步骤: 1. 通过request对象获取请求转发器对象:RequestDispatcher getRequestDispatcher(String path) 2. 使用RequestDispatcher对象来进行转发:forward(Servlet ...
分类:
其他好文 时间:
2021-05-24 01:02:09
阅读次数:
0
当程序中有复合赋值运算符时,不同类型的数据会进行强制转换,比如下面例子:byte b += 2,是把int类型数据强制转换成byte,然后在进行赋值操作的! public class AssignOperator { public static void main(String[] args) { ...
分类:
编程语言 时间:
2021-05-24 00:59:35
阅读次数:
0
桌面新建一个文本文档(新建文本文档.txt)将文件名修改为 Demo01.java,内容如下: public class Demo01 { public static void main(String[] args) { int a = 10; System.out.println(a); } } ...
分类:
编程语言 时间:
2021-05-24 00:55:02
阅读次数:
0
package test; public class BubbleSort { public void bubble(Integer[] array,int from,int end) { for(int k=1;k<end-from+1;k++) { for(int i=end-from;i>=k ...
分类:
编程语言 时间:
2021-05-24 00:31:25
阅读次数:
0
package experiment6; public interface ISoundable { public void increaseVolume(); public void decreaseVolume(); public void stopSound(); public void pl ...
分类:
其他好文 时间:
2021-05-24 00:30:07
阅读次数:
0
@RequestMapping(value = "/downfile", method = RequestMethod.GET) public void downfile(HttpServletRequest request, HttpServletResponse response) { try ...
分类:
编程语言 时间:
2021-05-24 00:28:07
阅读次数:
0
#include<iostream> #include<cstring> #include<string> #include<stdio.h> using namespace std; void print(int n,char *x,char *y) { if(n<=0) return; int ...
分类:
其他好文 时间:
2021-05-23 23:32:39
阅读次数:
0