- 博客(10)
- 收藏
- 关注
转载 Enumeration与Iterator接口
Enumeration接口HashTable和Vector中的元素遍历都是用的Enumeration接口实现的。hasMoreElements();//判断Enumeration中是否还有元素nextElement();//返回下一个元素Iterator 接口An iterator over a collection. Iteratortakes ...
2018-04-07 16:07:00
134
转载 Factory
简单工厂模式严格来讲简单工厂模式不是一种设计模式。public IProduct producing(String type) { switch(type) { case "A1" : return new ProductA1(); case "A2" : return new ProductA2(); ...
2018-04-06 22:14:00
105
转载 MySQL练习50题
这是网上的练习,花了点时间用MySQL做了一下。初始化数据库:create database db50issues;use db50issues;create table Student(sid varchar(10),sname nvarchar(10),sage datetime,ssex nvarchar(10));insert into Stude...
2018-03-29 16:58:00
149
转载 3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is ...
2018-03-28 00:00:00
76
转载 2.Add Two Numbers
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 contain a single digit. Add the two numbers and ret...
2018-03-27 23:57:00
67
转载 1.Two Sum
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 exactly one solution, and you may not use the ...
2018-03-27 00:13:00
76
转载 Java集合类
将以以下形式记录常用的类信息:1、继承关系2、具体的底层实现3、提供的初始化方法和方法一、Map接口二、Collection接口public interface Collection<E>{ int size(); boolean add(E element); Iterator<E> iterator; bool...
2018-03-25 23:34:00
96
转载 Singleton
单例应该是最简单的设计模式,下面是几种不同的写法:1.线程安全的懒汉 public class Singleton { private static Singleton instance; private Singleton (){} public static synchronized Singleto...
2018-03-24 20:19:00
58
转载 SQL的执行顺序与使用MySQL进行排名
问题描述:碰到这个问题是在使用MySQL显示排名时候引出来的,在执行SQL时的执行顺序问题。a.显示排名,相同年龄不同排名1 SELECT pid, name, age, @curRank := @curRank + 1 AS rank2 FROM players p, (3 SELECT @curRank := 04 ) q5 ORDER BY age...
2018-03-12 23:47:00
127
转载 时刻警醒自己
摘自知乎用户匿名评论:其实,程序员职业也就那么回事。别太看高互联网,也别太看低自己。华为招人太水是事实(中兴就不提了),除了少数特别offer,基本上招来的都是非CS专业,或者CS里中下等应届生,华为也乐在其中,便宜、听话、吃苦耐劳、好培养。主要是因为互联网行业现在、将来会持续大热,够fashional,且资本热钱不断涌入,BAT等公司给应届生的工资开的高,华为offer万年中下等。...
2015-10-16 17:29:00
146
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人