自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 资源 (2)
  • 收藏
  • 关注

原创 给定一个字符串如何判断该字符串中某一字符出现的频率并找出出现频率最高的字符和频率

package learn.java;import java.util.HashMap;import java.util.Iterator;import java.util.Map;public class CountCharNumber { /** * @param args */ @SuppressWarnings("unchecked") public stati

2014-03-25 18:30:48 2224

转载 Java中堆和栈的区别

栈与堆都是Java用来在Ram中存放数据的地方。与C++不同,Java自动管理栈和堆,程序员不能直接地设置栈或堆。 Java的堆是一个运行时数据区,类的(对象从中分配空间。这些对象通过new、newarray、anewarray和 multianewarray等指令建立,它们不需要程序代码来显式的释放。堆是由垃圾回收来负责的,堆的优势是可以动态地分配内存大小,生存期也不必事 先告诉编译器,

2014-03-24 14:15:16 644

转载 JVM中的堆和栈

JVM是基于堆栈的虚拟机。JVM为每个新创建的线程都分配一个堆栈。也就是说,对于一个Java程序来说,它的运行就是通过对堆栈的操作来完成的。堆栈以帧为单位保存线程的状态。JVM对堆栈只进行两种操作:以帧为单位的压栈和出栈操作。  我们知道,某个线程正在执行的方法称为此线程的当前方法。我们可能不知道,当前方法使用的帧称为当前帧。当线程激活一个Java方法,JVM就会在线程的Java堆栈里新压

2014-03-22 20:27:51 1025

原创 Java String类中的compareTo源代码分析

String的compareTo其实就是依次比较两个字符串ASC码。如果两个字符的ASC码相等则继续后续比较,否则直接返回两个ASC的差值。如果两个字符串完全一样,则返回0,如果长度不一样就返回整数或者负数来表示待比较的两个字符串的长度差值。来看一下源代码。 public int compareTo(String s) { int i = value.length

2014-03-22 15:05:05 3096

原创 Java快速排序的实现和时间空间复杂度分析

package learn.java;public class QuickSort { /** * @param args */ public static void main(String[] args) { int[] pendingSort={10,13,2,1,20,39,45,32,3,5,6,86,9,100,99,45,65,65,23};

2014-03-22 09:55:43 1264

原创 冒泡排序算法的java实现

package learn.java;public class BubbleSort { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub int[] pendingSort={3,5,9,1,7,2};//n-1 times

2014-03-21 21:02:48 774

原创 两个数的最大公约数和最小公倍数的算法

package learn.java;public class Test{ /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub int m=45; int n=50; i

2014-03-21 09:19:15 838

Next Generation Java Testing TestNG

Doing the right thing is rarely easy. Most of us should probably eat better, exercise more, and spend more time with our families. But each day, when confronted with the choice of being good or doing the easy thing, we often choose the easy thing because, well, it’s easier. It is the same way with software testing. We all know that we should spend more effort on testing, that more testing will make our code more reliable and maintainable, that our users will thank us if we do, that it will help us better understand our own programs, but each day when we sit down to the computer and choose between writing more tests and writing more application code, it is very tempting to reach for the easy choice.

2015-10-08

OCA Java SE 7 Programmer I Certification Guide

OCA Java SE 7 Programmer I Certification Guide

2014-03-17

空空如也

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

TA关注的人

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