2023年2月17日

java 网络编程 通信 Connection refused: connect解决方法

摘要: 运行问题: 编写完客户端和服务端后,要先运行服务端,在运行客户端,原因:服务端中accept()是阻塞的,等待的,监听客户端传过来的端口,所以应该是先运行 如果先运行客户端会报 Connection refused: connect, 阅读全文

posted @ 2023-02-17 15:05 小白药 阅读(327) 评论(0) 推荐(0)

2023年2月15日

java 打印26英文字母

摘要: 每个字符都有对应对应的Unicode 值 ,Unicode把所有的字符都用一串数字表示 public class demo01 { public static void main(String[] args) throws InterruptedException { t02 t02 = new t 阅读全文

posted @ 2023-02-15 18:05 小白药 阅读(90) 评论(0) 推荐(0)

2023年2月3日

java翻转数组

摘要: 写一个方法用于翻转数组 static void arr(String[] str){ String[] arr=new String[str.length]; int count=0; for (int i = str.length-1; i >=0 ; i--) { arr[count]=str[ 阅读全文

posted @ 2023-02-03 14:09 小白药 阅读(29) 评论(0) 推荐(0)

导航