Java 7 for Absolute Beginners
CHAPTER 13 ■ GARBAGE COLLECTION public class TargetClickPanel extends JPanel implements MouseListener{ private static final long ...
CHAPTER 13 ■ GARBAGE COLLECTION Consider the lines in bold (the targets array and the lines within the paint method that create ...
CHAPTER 13 ■ GARBAGE COLLECTION real-time monitoring of things like valves in a refinery. Later versions fixed that problem, but ...
CHAPTER 13 ■ GARBAGE COLLECTION As a case in point, consider an XML parser. It must have a reference to each node in the documen ...
CHAPTER 13 ■ GARBAGE COLLECTION right now. That is, no method or class exists to let you specifically collect an existing object ...
CHAPTER 13 ■ GARBAGE COLLECTION Java's garbage collector sweeps the young generation more often than the tenured generations and ...
CHAPTER 13 ■ GARBAGE COLLECTION Table 13-2. Garbage Collection Settings Switch Effect -XX:NewRatio=3 Sets the ratio of objects i ...
CHAPTER 13 ■ GARBAGE COLLECTION Optimizing Garbage Collection Now that you understand the basics of how to configure memory and ...
CHAPTER 13 ■ GARBAGE COLLECTION Let's examine these results a bit. First, we can see that the young generation has 17920K alloca ...
CHAPTER 13 ■ GARBAGE COLLECTION have gotten into a situation where garbage collection wouldn't work correctly, as I'd still be h ...
CHAPTER 13 ■ GARBAGE COLLECTION public static ArrayList<Object> referenceList; public static void main(String[] args) { re ...
CHAPTER 13 ■ GARBAGE COLLECTION Summary In this chapter, we've touched on one of Java's more advanced concepts: garbage collecti ...
C H A P T E R 1 4 263 Recursion Recursion has an undeserved reputation for being hard to do and hard to control. For various rea ...
CHAPTER 14 ■ RECURSION Recursion is Common You encounter instances of recursion every day and never think twice about them. The ...
CHAPTER 14 ■ RECURSION public static void main(String[] args) { Factorial factorial = new Factorial(); System.out.println(factor ...
CHAPTER 14 ■ RECURSION If I had calculated the factorial of ten (10!), I would have had ten instances of the calculate method on ...
CHAPTER 14 ■ RECURSION Repetitive mathematical functions, such as a factorial, a sum of digits, the Fibonacci sequence, and man ...
CHAPTER 14 ■ RECURSION ■ Note Fibonacci numbers turn up in all kinds of interesting places. They are closely linked to the golde ...
CHAPTER 14 ■ RECURSION exitItem.setMnemonic('x'); exitItem.addActionListener(this); file.add(exitItem); JMenuItem redrawItem = n ...
CHAPTER 14 ■ RECURSION import javax.swing.JPanel; public class SierpinskiTrianglePanel extends JPanel { private static final lon ...
«
7
8
9
10
11
12
13
14
15
16
»
Free download pdf