最新文章列表

Item 78: Consider serialization proxies instead of serialized instances

1.  The serialization proxy pattern is reasonably straightforward. First, design a private static nested class of the serializable class that concisely represents the logical state of an instance of ...
leonzhx 评论(0) 有1060人浏览 2014-05-05 23:57

Item 77: For instance control, prefer enum types to readResolve

1.  The readResolve feature allows you to substitute another instance for the one created by readObject. If the class of an object being deserialized defines a readResolve method with the proper decla ...
leonzhx 评论(0) 有1130人浏览 2014-05-05 12:57

Item 17: Design and document for inheritance or else prohibit it

1.  The class must document precisely the effects of overriding any method. In other words, the class must document its self-use of overridable methods.   2.  By convention, a method that invokes o ...
leonzhx 评论(0) 有1675人浏览 2013-03-10 22:52

Item 15: Minimize mutability

1.  The Java platform libraries contain many immutable classes, including String, the boxed primitive classes, and BigInteger and BigDecimal.   2.  Immutable classes are easier to design, implement ...
leonzhx 评论(0) 有1017人浏览 2013-03-01 16:11

序列化到底是怎么回事

有感:花了7年多时间才感悟到什么样才是一个真正的程序员。 “研究”了那么多“高深”的东西后才发现,原来“低级”的基础是那么重要。 面对基础,我又是那么无知。   所谓Java的序列化是指,Java对象(注意是对象、对象)可以被编码成字节码的形式(主要用于存储或传输),同时可以进行逆向的操作,“反”序列化成JVM中的对象。   当然,不是所有的Java对象都可以序列化:必须实现java.i ...
sharajava 评论(0) 有1351人浏览 2011-12-04 22:16

最近博客热门TAG

Java(141744) C(73651) C++(68608) SQL(64571) C#(59609) XML(59133) HTML(59043) JavaScript(54919) .net(54785) Web(54514) 工作(54118) Linux(50905) Oracle(49875) 应用服务器(43289) Spring(40812) 编程(39454) Windows(39381) JSP(37542) MySQL(37267) 数据结构(36424)

博客人气排行榜

    博客电子书下载排行

      >>浏览更多下载

      相关资讯

      相关讨论

      Global site tag (gtag.js) - Google Analytics