jing zhu's Library tagged → View Popular
StringBuffer versus String - JavaWorld
-
Using a
StringBufferfor concatenation can in fact produce code that is significantly faster than using aString. -
After the concatenation is performed on the
StringBufferobject, it must be converted back into aString. This is done with the call to thetoStringmethod at location 26. This method creates a newStringobject from the temporaryStringBufferobject. The creation of this temporaryStringBufferobject and its subsequent conversion back into aStringobject are very expensive. - 1 more annotations...
HashMap (Java 2 Platform SE v1.4.2)
-
The HashMap
class is roughly equivalent to Hashtable, except that it is
unsynchronized and permits nulls -
If multiple
threads access this map concurrently, and at least one of the threads
modifies the map structurally, it must be synchronized externally.
Vector or ArrayList -- which is better? - JavaWorld
-
both the
ArrayListandVectorhold onto their contents using anArray.
Defining an Interface (The Java™ Tutorials > Learning the Java Language > Interfaces and Inheritance)
-
access specifier
Interfaces (The Java™ Tutorials > Learning the Java Language > Interfaces and Inheritance)
-
There are a number of situations in software engineering when it is
important for disparate groups of programmers to agree to a "contract"
that spells out how their software interacts. -
an interface is a reference type, similar to a class, that can contain only
constants, method signatures, and nested types. - 2 more annotations...
Abstract Methods and Classes (The Java™ Tutorials > Learning the Java Language > Interfaces and Inheritance)
-
Abstract Classes versus Interfaces
-
If an abstract class
contains only abstract method declarations, it should be declared as an interface instead. - 1 more annotations...
Using Java Reflection
-
The ability to examine and manipulate a Java class from within itself
-
The reflection classes, such as
Method, are found in
java.lang.reflect. There are three steps that must be followed to use
these classes
Subtyping (The Java™ Tutorials > Learning the Java Language > Generics)
-
Surprisingly, the answer is "no", because
Box<Integer>andBox<Double>are not subtypes ofBox<Number>
Bounded Type Parameters (The Java™ Tutorials > Learning the Java Language > Generics)
-
bounded type parameters
Generic Methods and Constructors (The Java™ Tutorials > Learning the Java Language > Generics)
-
Type parameters can also be declared within method and constructor signatures to create
generic methods and generic constructors. -
A more realistic use of generic methods
Generic Types (The Java™ Tutorials > Learning the Java Language > Generics)
-
generic type declaration
-
An invocation of a generic type is generally known as a parameterized type
- 1 more annotations...
Introduction (The Java™ Tutorials > Learning the Java Language > Generics)
-
Generics add stability to your code by making more of your bugs detectable
at compile time.
Providing Constructors for Your Classes (The Java™ Tutorials > Learning the Java Language > Classes and Objects)
-
The compiler automatically provides a no-argument,
default constructor for any class without constructors
Inner Class Example (The Java™ Tutorials > Learning the Java Language > Classes and Objects)
-
Inner classes can be used to implement helper classes
like the one shown in the example above. If you plan on handling
user-interface events, you will need to know how to use inner
classes because the event-handling mechanism makes extensive
use of them
What is the difference between... | CareerCup
-
1)final
When applied to variable(primitive): The value of the variable cannot change.
When applied to variable(reference): The reference variable cannot point to any other object on the heap.
When applied to method: The method cannot be overridden.
When applied to class: The class cannot be subclasses.2)finally
There is an optional finally block after the try block or after the catch block. Statements in the finally block will always be executed (except if JVM exits from the try block). finally block is used to write the clean up code.3)finalize
This is the method the JVM runs before running the garbage collector.
Selected Tags
Sponsored Links
Top Contributors
Groups interested in no_tag
-
Erotica
Items: 40 | Visits: 3365
Created by: Ainis
-
Digital Citizenship/Cyberbullying Video Clips
Items: 27 | Visits: 2047
Created by: Anne Bubnic
-
Web 2.0 Tools
Items: 10 | Visits: 892
Created by: Claire Miller
Diigo is about better ways to research, share and collaborate on information. Learn more »
Join Diigo
