自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(35)
  • 资源 (1)
  • 收藏
  • 关注

转载 Java 线程/内存模型的缺陷和增强

原文地址:http://www.uml.org.cn/j2ee/j2ee090601.htmshyguy 原创    本文是由JR主持写作的《J2SE进阶》一书的部分章节整理而成,《J2SE进阶》正在写作、完善阶段。您阅读后,有任何建议、批评,请和我联系,或在这儿留言。《J2SE进阶》写作项目组感谢您阅读本文。Java

2014-09-25 17:02:21 480

原创 不用第三个变量,交换两个int数

package com.others;public class ExchangeInt { /** * 不用第三个变量,交换两个int数 */ public static void exchange(int a,int b){ System.out.println("a=" + a +",b=" + b); if((a > 0 && b 0)){ //同号 b

2014-09-19 17:13:06 439

原创 青蛙跳

N块石头,青蛙在第1块石头上。青蛙跳,每次只能跳1个或者2个。问跳到第N块石头一共有多少种不同的跳法 public class FrogJump { public static int frogJumpWays(int n){ if(n == 1 || n ==2){ return 1; } int tmp = 1; int num1 = 1; in

2014-09-17 16:53:28 512

原创 反转单链表

反转单链表:class LinkNode{ private int num; private LinkNode next; public LinkNode(){ } public LinkNode(int num){ this.num = num; } public int getNum() { return num; } public void setNum(

2014-09-17 15:48:12 419

原创 象棋中马走日字,给定棋盘上两个点,求两点间马最少走几步可达

一道有趣的算法题:package com.others;import java.util.ArrayDeque;import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;import java.util.Stack;/** * * 马走日字,

2014-09-17 14:33:32 5852 1

原创 jvm 参数问题

1.6 jvm各个区内存默认大小??1.7jvm各个区内存默认大小??zhan

2014-08-31 20:24:25 413

原创 codility test 4

package com.lesson2;import java.util.BitSet;/** * * Write a function: class Solution { public int solution(int[] A); } that, * given a non-empty zero-indexed array A of N integers, returns the

2014-08-29 10:56:07 695

原创 codility test3

package com.lesson2;/** * * You are given N counters, initially set to 0, and you have two possible * operations on them: increase(X) − counter X is increased by 1, max counter − * all counters

2014-08-29 10:44:15 782

原创 codility test 2

FrogRiverOne package com.lesson2;import java.util.BitSet;/** *  * A small frog wants to get to the other side of a river. The frog is currently * located at position 0, and wants to ge

2014-08-26 16:50:35 935

原创 codility test

lesson 1: PermMissingElempackage com.lesson1;import java.util.BitSet;/** * A zero-indexed array A consisting of N different integers is given. The array * contains integers in the range

2014-08-26 16:48:19 1453

原创 java中error和exception的区别

javadoc中对error描述如下:

2014-08-25 16:59:29 393

原创 求一个字符串的最长无重复字母的连续子串

如字符串“abacdabefac”, 则其最长无重复字母的连续zichu

2014-08-24 22:10:59 682

原创 TODO List

1. spring 源码分析2.设计模式3.java classLoader

2014-08-12 16:26:16 344

原创 maven Error occurred during initialization of VM

Error occurred during initialization of VMCould not reserve enough space for object heapCould not create the Java virtual machine.

2014-08-12 16:06:09 5036

转载 如何清理threadlocals

http://stackoverflow.com/questions/3869026/how-to-clean-up-threadlocals

2014-08-12 14:13:12 2038

原创 杂记

记录一下,以防忘记1. eclipse查找/替换换行符:

2014-07-31 10:26:00 360

原创 使用log4jdbc记录db log

log4jdbc可以用来生成实际参考:https://code.google.com/p/log4jdbc/

2014-07-22 16:40:34 574

原创 java 强引用 软引用 弱引用

强引用:byte[

2014-07-17 11:30:46 378

原创 gc日志分析

[Full GC (System) 1.265: [Tenured: 51610K->51610K(62148K), 0.0098892 secs] 51746K->51610K(67140K), [Perm : 1330K->1330K(12288K)], 0.0100709 secs] [Times: user=0.02 sys=0.00, real=0.01 secs]Ten

2014-07-16 13:38:29 424

原创 oracle: set currval of sequenct

select HIBERNATE_SEQUENCE.nextval from dual

2014-07-15 13:42:27 414

翻译 java 6/7 加密解密 java.security.InvalidKeyException: Illegal key size

Most likely you don't have the unlimited strength file installed now.You may need to download this file:Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 6Ja

2014-07-09 09:20:47 529

原创 maven copy dependency 到指定位置

mavenxian有些时候,需要指定将dependency的jar拷到某个指定位置

2014-06-09 10:30:05 2440

原创 字符流 vs 字节流

字符流:Writer/Reader字节流:OutputStream/

2014-06-04 11:41:12 424

原创 Thread类里interrupted() 和isInterrupted()的区别

interrupted() : Interrupted status在此方法调用之后会被清掉

2014-06-03 15:20:10 542

原创 drools rule: stateful vs stateless knowledge session

both the sessions maintain a state. The difference is that a stateful session also maintains its statebetween session invocations (calls to the fireAllRules method). This is useful when weneed to

2014-05-30 11:45:34 1804

原创 exception handler in drools rule

As I know, we have 2 ways to handle exception in drools rule:1.  try-catch in rule

2014-05-30 11:36:18 1167

原创 CountDownLatch Test

package com.test.concurrent;import java.util.concurrent.CountDownLatch;import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;import java.util.concurrent.TimeUni

2014-05-30 11:16:28 496

原创 start managed server using wlst

1. start node manage(%wl_home%/common/bin/startManagedWebLogic.cmd)2.

2014-05-21 16:22:27 378

原创 weblogic cluster load balance

1. 创建文件夹 proxy/WEB-INF2.

2014-05-21 16:16:54 443

原创 Binary Search Tree

二叉查找树性质:如果y是x的左子树,

2014-05-06 15:09:56 372

原创 快速排序

快排也是用到了分治法的思想,对一个典型子数组A[p...r]排序的分治过程为三个步骤:1.分解:A[p..r]被划分为俩个(可能空)的子数组A[p ..q-1]和A[q+1 ..r],使得A[p ..q-1] 2.解决:通过递归调用快速排序,对子数组A[p ..q-1]和A[q+1 ..r]排序。3.合并。

2014-04-28 11:23:44 404

原创 归并排序

public class MergeSort {public int[] mergerSort(int[] arrays){int[] tmp = new int[arrays.length];mergSort(arrays,0,arrays.length -1,tmp);return arrays;}public void mergSort(int[] arr

2014-04-28 10:12:59 431

转载 有用的网址收藏

http://www.searchforum.org.cn/tansongbo/corpus-senti.htmhttp://wenku.baidu.com/view/819b90d676eeaeaad1f3306e.html

2014-04-25 11:48:11 642

原创 插入排序

算法原理:数组R[1]

2014-04-25 10:39:55 372

原创 冒泡排序

算法原理:将临近的数字两两比较,按照从小到大或者从大到小的shun

2014-04-25 10:03:06 407

多家IT公司的面试笔试题

46家IT公司的笔试题~ 多家IT公司的面试笔试题

2009-04-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除