import java.util.Scanner;
public class Main{
public static void main(String[]args){
Scanner scanner = new Scanner(System.in);
String s=scanner.nextLine();
if (s.isEmpty()) {
System.out.println(0);
}e...
分类:
其他好文 时间:
2015-08-18 19:29:31
阅读次数:
96
实例:
实现一个简单的加薪流程
UML类图:
实例实现代码:
static void Main(string[] args)
{
CommonManager jinli = new CommonManager("金利");
Majordomo zongjian = new Ma...
分类:
其他好文 时间:
2015-08-18 19:29:29
阅读次数:
131
public class FileZip {
/**
*
* @param srcfile 文件名数组
* @param zipfile 压缩后文件
*/
public static void ZipFiles(File[] srcfile, File zipfile) {
byte[] buf...
分类:
其他好文 时间:
2015-08-18 19:23:01
阅读次数:
82
public static Map solrCloudR() throws Exception { Map mapResult = new HashMap(); String zkHost = "ip:2181"; CloudSolrServer solrS...
/** * 读取 联系人 * @param context * @return */ public static List> getLocalContacts(Context context) { List> datas =...
分类:
移动开发 时间:
2015-08-18 19:05:01
阅读次数:
188
1.静态成员静态成员独立于类的对象,先于对象的存在而存在。无论创建了类的多少个对象,静态成员都只有一个实例空间。一个静态变量被同一个类的所有对象共享。当改变了其中一个对象的静态变量时,其余对象的静态变量值也相应会有改变,因为他们共享的是在同一个空间中的同一个量。因为静态变量与具体对象无关,所以静态变...
分类:
编程语言 时间:
2015-08-18 18:26:18
阅读次数:
106
public static void main(String[] args) { String[] letter = new String[]{"i","m","o","u","v","w","x"}; //AHiImMoOTuUvVwWxXY ...
分类:
其他好文 时间:
2015-08-18 18:14:23
阅读次数:
111
很多时候多线程能快速高效独立的计算数据,应用比较多。但今天遇到的多进程下的问题更是让人觉得复杂多进程下static变量都要失效,就目前的平台和产品static使用是很多的,各种session、cache等,完全不适合多进程。分布式系统之间不能相互使用进程内的变量,必须使用分布式缓存之类的远程容器,否...
分类:
其他好文 时间:
2015-08-18 18:06:56
阅读次数:
8272
int dayofweek(int y, int m, int d) /* 0 = Sunday */{static int t[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4};y -= m < 3;return (y + y/4 - y/100 + y/400 +...
分类:
编程语言 时间:
2015-08-18 18:05:59
阅读次数:
142
1、HashMap怎么存数据
在HashMap中使用内部静态类(Entry)数组table存数据,即Entry[] table;
static class Entry implements Map.Entry {
final K key;
V value;
Entry next;
int hash;
...
分类:
编程语言 时间:
2015-08-18 16:28:11
阅读次数:
145