会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Z小t的一亩三分地
Stay hungry,stay foolish!
博客园
首页
新随笔
联系
订阅
管理
2015年8月2日
Leetcode--String to Integer (atoi)(easy)
摘要: 题目描述:Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see be...
阅读全文
posted @ 2015-08-02 16:44 Z小t
阅读(187)
评论(0)
推荐(0)
2015年7月26日
Leetcode--Reverse Integer(Easy)
摘要: 题目描述:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return –321解决方法:public int reverse(int value) { int r...
阅读全文
posted @ 2015-07-26 16:51 Z小t
阅读(128)
评论(0)
推荐(0)
Java 设计模式---单例模式
摘要: 单例模式的写法 1. 懒汉模式(线程不安全) 懒汉模式:顾名思义就是需要使用的时候才实例化; 线程不安全:设想两个线程同时都运行到判断instance是否等于null的if语句,并且instance的确没有被创建,那么这两个线程都会创建一个实例(执行:instance = new Singleton1),此时就不满足单例模式的要求。 package Singleton; public cla...
阅读全文
posted @ 2015-07-26 11:13 Z小t
阅读(221)
评论(0)
推荐(0)
公告