2015年12月28日
摘要: The stack is the memory set aside as scratch space for a thread of execution. When a function is called, a block is reserved on the top of the stack f... 阅读全文
posted @ 2015-12-28 20:02 gyt929458988 阅读(246) 评论(0) 推荐(0)
摘要: This post is Part 8 in the series of posts on Garbage Collection (GC). Please see the indexhere.One of the primary disadvantage discussed in the post ... 阅读全文
posted @ 2015-12-28 15:56 gyt929458988 阅读(236) 评论(0) 推荐(0)
摘要: How much a stack can grow?You can use a VM option namedssto adjust the maximum stack size. A VM option is usually passed using -X{option}. So you can ... 阅读全文
posted @ 2015-12-28 15:36 gyt929458988 阅读(857) 评论(0) 推荐(0)
  2015年12月27日
摘要: PublicPublic is the most well known of the Java keywords. Public is also the easiest of the Java access modifiers because of its nature. A variable or... 阅读全文
posted @ 2015-12-27 14:54 gyt929458988 阅读(829) 评论(0) 推荐(0)
摘要: Java Generic's wildcards is a mechanism in Java Generics aimed at making it possible to cast a collection of a certain class, e.g A, to a collection o... 阅读全文
posted @ 2015-12-27 09:09 gyt929458988 阅读(747) 评论(0) 推荐(0)
摘要: Java provides a number of access modifiers to set access levels for classes, variables, methods and constructors. The four access levels are:Visible t... 阅读全文
posted @ 2015-12-27 00:13 gyt929458988 阅读(915) 评论(0) 推荐(0)
  2015年12月26日
摘要: From the highly regardedElements of Java Styleto the pages ofJavaWorld(seeJava Tip 67), many well-meaning Java gurus encourage the use of the double-c... 阅读全文
posted @ 2015-12-26 16:18 gyt929458988 阅读(458) 评论(0) 推荐(0)
摘要: Java supports multiple threads to be executed. This may cause two or more threads to access the same fields or objects. Synchronization is a process w... 阅读全文
posted @ 2015-12-26 14:08 gyt929458988 阅读(2354) 评论(0) 推荐(0)
摘要: Depending on the usage, there are several "correct" answers.Since java5 the best way to do it is to use an enum:public enum Foo { INSTANCE;}The Righ... 阅读全文
posted @ 2015-12-26 08:39 gyt929458988 阅读(228) 评论(0) 推荐(0)
  2015年12月25日
摘要: Anonymous ClassesAnonymous classes enable you to make your code more concise. They enable you to declare and instantiate a class at the same time. The... 阅读全文
posted @ 2015-12-25 16:28 gyt929458988 阅读(468) 评论(0) 推荐(0)