好书推荐 好书速递 排行榜 读书文摘

Java解惑

Java解惑
作者:布洛克
副标题:Traps, Pitfalls, and Corner Cases
出版社:人民邮电出版社
出版年:2006-07
ISBN:9787115149565
行业:计算机
浏览数:93

内容简介

本书深入研究Java编程语言及其核心类为的细微之处,特写95个有关Java或其他类库的陷阱和缺陷的谜题,其中大多数谜题都采用短程序的形式给出。在每个谜题之后都有详细的解惑方案,这些方案在给出那些实际行为与表面上迥异的程序行为的简单解释的同时,更向读者展示了如何一劳永逸地避免底层的陷阱与缺陷。本书附录部分列出了陷阱及缺陷的目录,可供读者进一学习参考。  本书以轻松诙谐的语言,寓教于乐的方式,由浅入深、总结归纳Java编程语言的知识点,适合具有Java知识的学习者和有编程经验的Java程序员阅读。

......(更多)

作者简介

JOSHUA BLOCH是Google的首席工程师,以及获得过Jolt最畅销奖的《高效Java编程语言指南(Effective Java Programming Language Guide)》(Addson-Wesley,2001)一书的作者。他之前是Sun Microsystems的杰出工程师和Transarc的资深系统设计师。Josh领导了大量的Java平台特性的设计与实现工作,包括JDK 5.0中的语言增强和获奖的Java集合框架。他拥有卡耐基.梅隆大学计算机科学的博士学位。 NEAL GAFTER是Google的软件工程师和Java的传道者。他之前是Sun Microsystems的资深员工工程师,在那里他领导了Java编译器的开发工作,并且通过5.0版实现了1.4版中的Java语言特性。Neal曾经是C++标准委员会的成员,他在Sun Microsystems、Microtec Research和Texas Instruments时领导了C和C++编译器的开发工作。他拥有罗彻斯特大学计算机科学的博士学位。

......(更多)

目录

1 introduction.

2 expressive puzzlers

puzzle 1: oddity

puzzle 2: time for a change

puzzle 3: long division

puzzle 4: it's elementary

puzzle 5: the joy of hex

puzzle 6: multicast

puzzle 7: swap meat

puzzle 8: dos equis

puzzle 9: tweedledum

puzzle 10: tweedledee

3 puzzlers with character

puzzle 11: the last laugh

puzzle 12: abc

puzzle 13: animal farm

puzzle 14: escape rout

puzzle 15: hello whirled

puzzle 16: line printer

puzzle 17: huh?

.puzzle 18: string cheese

puzzle 19: classy fire

puzzle 20: what's my class?

puzzle 21: what's my class, take 2

puzzle 22: dupe of url

puzzle 23: no pain, no gain

4 loopy puzzlers

puzzle 24: a big delight in every byte

puzzle 25: inclement increment

puzzle 26: in the loop

puzzle 27: shifty i's

puzzle 28: looper

puzzle 29: bride of looper

puzzle 30: son of looper

puzzle 31: ghost of looper

puzzle 32: curse of looper

puzzle 33: looper meets the wolfman

puzzle 34: down for the count

puzzle 35: minute by minute

5 exceptional puzzlers

puzzle 36: indecision

puzzle 37: exceptionally arcane

puzzle 38: the unwelcome guest

puzzle 39: hello, goodbye

puzzle 40: the reluctant constructor

puzzle 41: field and stream

puzzle 42: thrown for a loop

puzzle 43: exceptionally unsafe

puzzle 44: cutting class

puzzle 45: exhausting workout

6 classy puzzlers..

puzzle 46: the case of the confusing constructor

puzzle 47: well, dog my cats!

puzzle 48: all i get is static

puzzle 49: larger than life

puzzle 50: not your type

puzzle 51: what's the point?

puzzle 52: sum fun

puzzle 53: do your thing

puzzle 54: null and void

puzzle 55: creationism

7 library puzzlers

puzzle 56: big problem

puzzle 57: what's in a name?

puzzle 58: making a hash of it

puzzle 59: what's the difference?

puzzle 60: one-liners

puzzle 61: the dating game

puzzle 62: the name game

puzzle 63: more of the same

puzzle 64: the mod squad

puzzle 65: a strange saga of a suspicious sort

8 classier puzzlers

puzzle 66: a private matter

puzzle 67: all strung out

puzzle 68: shades of gray

puzzle 69: fade to black

puzzle 70: package deal

puzzle 71: import duty

puzzle 72: final jeopardy

puzzle 73: your privates are showing

puzzle 74: identity crisis

puzzle 75: heads or tails?

9 more library puzzlers

puzzle 76: ping pong

puzzle 77: the lock mess monster

puzzle 78: reflection infection

puzzle 79: it's a dog's life

puzzle 80: further reflection

puzzle 81: charred beyond recognition

puzzle 82: beer blast

puzzle 83: dyslexic monotheism

puzzle 84: rudely interrupted

puzzle 85: lazy initialization

10 advanced puzzlers

puzzle 86: poison-paren litter

puzzle 87: strained relations

puzzle 88: raw deal

puzzle 89: generic drags

puzzle 90: it's absurd, it's a pain, it's superclass!

puzzle 91: serial killer

puzzle 92: twisted pair

puzzle 93: class warfare

puzzle 94: lost in the shuffle

puzzle 95: just desserts

a catalog of traps and pitfalls

b notes on the illusions

references

index

......(更多)

读书文摘

有一条规则描述从较窄的整型转化为较宽的整型时符号扩展性为:如果最初的数值类型是有符号的,就执行符号扩展;如果它是char,那么不管它将要被转换为什么类型,都执行零扩展。

......(更多)

猜你喜欢

点击查看