11 2015 档案

摘要:一、什么是线程安全 当多个线程访问一个类时,如果不用考虑这些线程在运行时环境下的调度和交替执行,并且不需要额外的同步及在调用代码代码不必作其他的协调,这个类的行为仍然是正确的,那么称这个类是线程安全的。 内部锁 Java提供了强制性的内置锁机制:synchronized块。一个synchron... 阅读全文
posted @ 2015-11-26 21:43 温布利往事 阅读(4422) 评论(0) 推荐(1) 编辑
摘要:一、概述 本文将讨论Java static关键字的使用。它可以被用于类名、变量、方法和块。二、静态类 只有当一个类为嵌套类时才能使用static,这个嵌套类可以不使用外部类的对象就可以访问。例子:public class TestMain { static class X { ... 阅读全文
posted @ 2015-11-26 15:32 温布利往事 阅读(385) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://leetcode.com/problems/longest-palindromic-substring/题目:Given a stringS, find the longest palindromic substring inS. You may assume that t... 阅读全文
posted @ 2015-11-05 20:17 温布利往事 阅读(344) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://leetcode.com/problems/median-of-two-sorted-arrays/题目:There are two sorted arraysnums1andnums2of size m and n respectively. Find the media... 阅读全文
posted @ 2015-11-04 19:23 温布利往事 阅读(947) 评论(1) 推荐(0) 编辑
摘要:一、概述 Android系统为实现通信将PC电脑IP设置为10.0.2.2,自身设置为127.0.0.1,而PC并没有为Android模拟器系统指定IP,所以PC电脑不能通过IP来直接访问Android模拟器,要实现PC机和Android模拟器之间的相互通信必须借助于端口重定向(redir)。二、... 阅读全文
posted @ 2015-11-04 10:06 温布利往事 阅读(10056) 评论(2) 推荐(1) 编辑
摘要:题目链接:https://leetcode.com/problems/longest-substring-without-repeating-characters/题目:Given a string, find the length of the longest substring without ... 阅读全文
posted @ 2015-11-03 19:47 温布利往事 阅读(323) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示