摘要:
Enumeration接口 HashTable和Vector中的元素遍历都是用的Enumeration接口实现的。 hasMoreElements();//判断Enumeration中是否还有元素 nextElement();//返回下一个元素 Iterator 接口 An iterator ove 阅读全文
摘要:
简单工厂模式 严格来讲简单工厂模式不是一种设计模式。 工厂方法模式 定义一个用于创建对象的接口,让子类决定实现哪一个类。工厂方法使一个类的实例化延迟到其子类。 抽象工厂模式 提供一个创建一系列相关或者相互依赖对象的接口,而无需指定他们的具体实现。当产品只有一个的时候抽象工厂就退化成了工厂方法模式;当 阅读全文
摘要:
这是网上的练习,花了点时间用MySQL做了一下。 初始化数据库: 题目与解答: 阅读全文
摘要:
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng 阅读全文
摘要:
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contai 阅读全文
摘要:
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文
摘要:
将以以下形式记录常用的类信息: 1、继承关系 2、具体的底层实现 3、提供的初始化方法和方法 一、Map接口 二、Collection接口 public interface Collection<E> { int size(); boolean add(E element); Iterator<E> 阅读全文
摘要:
单例应该是最简单的设计模式,下面是几种不同的写法: 1.线程安全的懒汉 2.饿汉模式 3.枚举 4.静态内部类 5.双重校验锁 阅读全文
摘要:
问题描述:碰到这个问题是在使用MySQL显示排名时候引出来的,在执行SQL时的执行顺序问题。 a.显示排名,相同年龄不同排名 b.显示排名,相同年龄排名相同,相同年龄后的排名按照排名递增 c.相同年龄后的年龄排名按照之前排名总个数递增。 1 SELECT pid, name, age, rank F 阅读全文
摘要:
摘自知乎用户匿名评论:其实,程序员职业也就那么回事。别太看高互联网,也别太看低自己。华为招人太水是事实(中兴就不提了),除了少数特别offer,基本上招来的都是非CS专业,或者CS里中下等应届生,华为也乐在其中,便宜、听话、吃苦耐劳、好培养。主要是因为互联网行业现在、将来会持续大热,够fashion... 阅读全文