Use Stringbuffer When Appending to Strings
In Java, Strings are immutable objects. This means that they cannot be modified in any way after they are created. When you attempt to modify a String object, you often
In Java, Strings are immutable objects. This means that they cannot be modified in any way after they are created. When you attempt to modify a String object, you often
For a number of reasons, you might need to write an object to a file for future usage. Perhaps your applet needs to keep some sort of “state” and between
Singletons are builder design patterns where the number of instances is limited to one (according to the Gang of Four – DesignPatterns). The most common way of implementing them is
The following java code allows you to identify the operating system on which your application is running: class OperatingSystem{ public static void main(String args[]) { System.out.println (“Operating system : “
There are lots if times when the system needs to be restarted, for example, after changing the autoexec.bat path. Here is code you can use, in the place of writing
‘ Hide/Show the Explorer’s (Windows Explorer and IE) File menu’ NOTE: this routine requires the SetRegistryValue,’ DeleteRegistryValue and CheckRegistryValue routines,’ that you can find in the CodeBank under the Windows
‘ Set the path of the picture used as background of the IE5/5.5 toolbar’ Note: requires the SetRegistryValue, CheckRegistryKey and CreateRegistryKey ‘ routines, you can find them in the CodeBank’
‘ Get the path of the picture used as background of IE 5/5.5 toolbar’ Note: requires the GetRegistryValue routine, you can find it in the CodeBank’ Example:’ MsgBox GetIEToolbarPicturePublic Function
‘ Clear the IE History’ Notes:’ This routine requires the DeleteRegistryKey and CreateRegistryKey routines,’ you can find them in the CodeBankPublic Sub ClearIEHistory() Const HKEY_CURRENT_USER = &H80000001 Dim sKey As