问题 1.List、LinkedList、Vector可以存null吗? 2.HashSet、TreeSet可以存null吗? 3.HashMap、TreeMap、Hashtable可以存null吗? 测试代码 public class TestNull { public static void m ...
分类:
其他好文 时间:
2020-12-30 11:28:59
阅读次数:
0
作者:Mazin 来源:my.oschina.net/u/3441184/blog/887152 首先我们来看一段代码: public class InternTest { public static void main(String[] args) { String str1 = new Stri ...
分类:
其他好文 时间:
2020-12-30 11:23:27
阅读次数:
0
题目: 给定一个正整数 n,生成一个包含 1 到 n2 所有元素,且元素按顺时针顺序螺旋排列的正方形矩阵。 示例: 输入: 3 输出: [ [ 1, 2, 3 ], [ 8, 9, 4 ], [ 7, 6, 5 ] ] 代码: 1 class Solution { 2 public int[][] ...
分类:
其他好文 时间:
2020-12-30 10:52:55
阅读次数:
0
import java.io.*; public class TIME { public static void main(String[] args) { File oldName = new File("路径/test.png"); File newName = new File(System. ...
分类:
移动开发 时间:
2020-12-30 10:46:56
阅读次数:
0
一、使用场景: 有两个类都继承了同一个抽象类: /// <summary> /// 沙盒基类 /// </summary> abstract class SandBoxGanmeBase { /// <summary> /// 名称 /// </summary> public string Name ...
分类:
Web程序 时间:
2020-12-30 10:42:50
阅读次数:
0
引入hidetake.ssh插件 buildscript { repositories { mavenLocal() maven { url "https://maven.aliyun.com/repositorys/public/" } maven { url "https://repo.spri ...
分类:
编程语言 时间:
2020-12-30 10:40:15
阅读次数:
0
` public class YanghuiTest { public static void main(String[] args) { int[][] yh = new int[10][]; for(int i=0;i<yh.length;i++){ yh[i] = new int[i+1]; ...
分类:
编程语言 时间:
2020-12-29 11:52:33
阅读次数:
0
package 随堂; public class 四棱坠 { public static void main(String[] args) { // TODO Auto-generated method stub for (int i = 1; i <= 10; i++) { for (int j ...
分类:
其他好文 时间:
2020-12-29 11:35:46
阅读次数:
0
一对一和一对多,使用书本、作者、书签 作为示例: 一本书只有一个作者,并且有多条书签 实体类: public class BookMark { public int Id { get; set; } public int BookId { get; set; } public virtual str ...
分类:
移动开发 时间:
2020-12-29 11:20:21
阅读次数:
0
部分内容比较生硬,还需要继续优化 public static ExcelWorksheet CreateExcel3<T>(ExcelPackage package, string sheetName, string title, string[] titles, IEnumerable<T> ax ...
分类:
其他好文 时间:
2020-12-29 11:20:04
阅读次数:
0