Misuse of System.exit
The System.exit method forces termination of all threads in the Java virtual machine. This can be drastic. It might, for example, destroy all windows created by the interpreter without giving
The System.exit method forces termination of all threads in the Java virtual machine. This can be drastic. It might, for example, destroy all windows created by the interpreter without giving
The following code prevents classes from serialization: public class MyClass implements Serializable{//you can write your code hereprivate void writeObject(ObjectOutputStream out) throws IOException{ throw new NotSerializableException();}private Object readObject(ObjectInputStream in) throws IOException,ClassNotFoundException{
The amount of time it takes to retrieve data blocks is proportionate to the number of extents in the table. Ideally, a table should have one to three extents. Run
The class JFileChooser inside javax.swing.* can be customized to display your own labels using the UIManager.put() method. It is a static method that takes an Object key (Original value) and
To eliminate duplicate values in a collection, Java provides it own API. HashSet (java.util.*) is the class which implements Set interface. import java.util.*;class Duplicate{ static void main(String[]arr){ HashSet set=new HashSet();
You may find that you want to know something about the form that contains the control you wish to use. You could do this by passing a reference to the
Visual Basic lacks the ability to make a file smaller without having to recreate it. But it is possible to use the SetEndOfFile API. Here is a function for it:
The following recursive function allows users to do an expand all via apopup menu: Public Sub ExpandAll(ByVal aNode As Node) Dim l_Counter As Long Dim l_Children As Long Dim temp_Node