
JAVA基础
San6653
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
字节流基础部分
IO流介绍原创 2023-02-21 23:25:40 · 181 阅读 · 0 评论 -
TreeMap统计字符串中的字符出现个数
main{ String s ="sdfasdfghah";// 集合中放入 字符和数字计数 TreeMap<Character,Integer> tm=new TreeMap<>(); for (int i = 0; i <s.length() ; i++) { char c=s.charAt(i);// 判断字符是否出现过在*集合*中第一次出现 .原创 2021-07-04 20:08:33 · 231 阅读 · 0 评论 -
如何用java编程快速拷贝几个T的学习视频文件,嘿嘿
1,准备视频文件2,代码编程import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.IOException;public class ioInOutPutStrean1 { public static void main(String[] args) throws IOException { // FileInputStream fis = ne原创 2021-02-14 20:04:47 · 299 阅读 · 1 评论 -
ES---Master选举和Bully算法
bully算法是一个分布式系统中动态选择master节点的算法,进程号最大的非失效的节点将被选为master。算法用三种消息类型:1)选举消息 (Election Message: Sent to announce election.)2)应答消息(Answer (Alive) Message: Responds to the Election message.)3)选举成功消息 (...转载 2019-12-03 15:57:53 · 1397 阅读 · 3 评论 -
编写一个JAVA程序 输入一个字符串 统计有多少个单词 单词用空格隔开
public class 统计单词 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.nextLine(); String[] split = str.split(" "); for (String string : split) {...原创 2019-11-28 10:59:57 · 7048 阅读 · 0 评论