在使用Log4j的类中导入包 import org.apache.log4j.Logger; 日志对象,参数为当前类的class static Logger logger = Logger.getLogger(UserDaoTest.class); //LogDemo为相关的类 日志级别: logg ...
分类:
其他好文 时间:
2021-04-19 14:56:03
阅读次数:
0
###方法1:同步代码块 synchronized ( 对象){ // 需要被同步的代码; } class Window extends Thread{ // private int ticket=100;//这样会有300张票 private static int ticket=100;//只有1 ...
分类:
编程语言 时间:
2021-04-19 14:44:35
阅读次数:
0
opt_map函数中对于指定了select program的分析 从过滤器中进行map static int open_output_file(OptionsContext *o, const char *filename) open_output_file函数中根据stream_map进行创建输出 ...
分类:
其他好文 时间:
2021-04-19 14:39:12
阅读次数:
0
public class MyInfo { public string Name { get; set; } public double Diff { get; set; } public string File { get; set; } } static void Main(string[] a ...
匿名函数 ::操作符 A static method (ClassName::methName) An instance method of a particular object (instanceRef::methName) A super method of a particular obje ...
分类:
编程语言 时间:
2021-04-16 12:22:24
阅读次数:
0
强类型语言:要求变量的使用要严格符合规定,所有变量都必须先定义后才能使用★ java的数据类型分为两大类: 基本类型(primitive type) 应用类型(reference type) public class Demo01 { public static void main(String[] ...
分类:
编程语言 时间:
2021-04-16 12:14:53
阅读次数:
0
static关键字 被static修饰的成员变量属于类,不属于这个类的某个对象。(也就是说,多个对象在访问或修改static修饰的成员变量时,其中一个对象将static成员变量值进行了修改,其他对象中的static成员变量值跟着改变,即多个对象共享同一个static成员变量) 被static修饰的成 ...
分类:
编程语言 时间:
2021-04-16 12:10:29
阅读次数:
0
package com.smile.test.sort.bubble; /** * 冒泡排序 时间复杂度O(n^2) */ public class Bubble { static void sort(Comparable[] a){ for (int i = a.length-1; i>0; i- ...
分类:
编程语言 时间:
2021-04-16 12:06:55
阅读次数:
0
参见微软官方 https://docs.microsoft.com/en-us/windows/win32/sysinfo/operating-system-versionusing System; using System.Collections.Generic; using System.Lin ...
数组遍历方式参考: 方法一:for循环遍历 public static void main(String[] args) { int Arr[][]={{1,2,3},{4,5,6}}; for (int i = 0; i < Arr.length; i++) { for (int j = 0; j ...
分类:
编程语言 时间:
2021-04-16 11:45:39
阅读次数:
0