1000 Java Tips ebook
Free "1000 Java Tips" eBook is here! It is huge collection of big and small Java
programming articles and tips. Please take your copy here.
Take your copy of free "Java Technology Screensaver"!.
Easy Learn Java: Programming Articles, Examples and Tips - Page 429
1060 Stories (530 Pages, 2 Per Page)
Question: What is difference between add() and addElement() in Vector?
Answer: This method is identical in
functionality to the add(Object) method (which is part of the List interface).
add(Object ) is due the fact that Vector implements List Interface and it is
appeared since Java 1.2 when Vector was moved to Collections: The collection
classes from earlier releases, Vector and Hashtable, have been
retrofitted to implement the collection interfaces.
addElement is "original" Vector's method....
comments? | | Score: 0
Posted by jalex on Monday, January 16, 2006 (18:05:00) (6326 reads)
Question: How do I find out how long the JVM has been running?
Answer: A Java virtual machine has
a single instance of the implementation class of this interface. This instance
implementing this interface is an MXBean (java.lang.management
package) that can be obtained by calling the
ManagementFactory.getRuntimeMXBean() method or from the platform MBeanServer
The ObjectName for uniquely identifying the MXBean for the runtime system
within an MBeanServer is:
This interface defines several convenient methods for accessing system
properties about the Java virtual machine:
Returns the boot class path that is used by the bootstrap
class loader to search for class files.
Returns the Java class path that is used by the system class
loader to search for class files.
Returns the input arguments passed to the Java virtual
machine which does not include the arguments to the main method.
Returns the Java library path.
Returns the version of the specification for the management
interface implemented by the running Java virtual machine.
Returns the name representing the running Java virtual
Returns the Java virtual machine specification name.
Returns the Java virtual machine specification vendor.
Returns the Java virtual machine specification version.
Returns the start time of the Java virtual machine in
Returns a map of names and values of all system properties.
Returns the uptime of the Java virtual machine in
Returns the Java virtual machine implementation name.
Returns the Java virtual machine implementation vendor.
Returns the Java virtual machine implementation version.
Tests if the Java virtual machine supports the boot class
path mechanism used by the bootstrap class loader to search for class files.
This tip is based on Java API(1.5)
comments? | | Score: 0
Posted by jalex on Saturday, January 14, 2006 (18:00:00) (2755 reads)