public class Singleton { private volatile static Singleton singleton; private Singleton (){} public static Singleton getSingleton() { if (singleton == ...
分类:
其他好文 时间:
2021-05-25 18:05:10
阅读次数:
0
作用: 1. 约束 2. 定义一些方法,让不同的如 人实现~ 10 》 十个员工去完成一份共同的工作 3. public abstract //方法 4. public static final //常量 5. 接口不能被实例化~,接口中没有构造方法~ 6. implements可以实现多个接口 7 ...
分类:
其他好文 时间:
2021-05-25 18:03:38
阅读次数:
0
Mockito 使用 PowerMock 让 Mockito 支持静态方法 PowerMock 是一个增强库,用来增加 Mockito 、EasyMock 等测试库的功能。 Mockito 默认是不支持静态方法 比如我们在 ExampleService 类中定义静态方法 add: public cl ...
分类:
其他好文 时间:
2021-05-25 18:00:57
阅读次数:
0
public class TestDemo { public static void main(String[] args) { //打印三角形 for (int i = 1; i <= 5; i++) { 03.成员控制访问: public 成员的访问不受限制,在程序中的任何地方都可以访问一个类的public成员 (只有提供给外界的API用该限制) privat ...
分类:
编程语言 时间:
2021-05-25 17:52:48
阅读次数:
0
public class ForDemo2 { public static void main(String[] args) { for (int i = 1; i <= 9; i++) { for (int j = 1; j <= i; j++) { System.out.print(i+ "*" ...
分类:
其他好文 时间:
2021-05-25 17:50:06
阅读次数:
0
1、开放地址法 所谓的开放定址法就是一旦发生了冲突,就去寻找下一个空的散列地址,只要散列表足够大,空的散列地址总能找到,并将记录存入。 公式为:fi(key) = (f(key)+di) MOD m (di=1,2,3,……,m-1) 2、再hash法 再哈希法又叫双哈希法,有多个不同的Hash函数 ...
分类:
其他好文 时间:
2021-05-25 17:44:53
阅读次数:
0
-M is for mouse events. List of Keys Collected from this source file C-<key> Hold Control + Key M-<key> Hold Meta + Key F1 F1 F2 F2 F3 F3 F4 F4 F5 F5 ...
分类:
其他好文 时间:
2021-05-24 17:20:24
阅读次数:
0
package cn.rushangw.lesson02;import java.awt.*;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;public class TestActonEvent2 { p ...
分类:
其他好文 时间:
2021-05-24 17:18:26
阅读次数:
0
public htmlToText(html: string) { return html .replace(/<br>/g, '') .replace(/<p>/g, '') .replace(/<\/p>/g, '') .replace(/<\s*b[^>]*>/g, '') .replace( ...
分类:
Web程序 时间:
2021-05-24 17:18:14
阅读次数:
0