
Using goto to Exit a Nested Loop
Loops (for, while, do..while) are used often in code?especially nested loops. Eventually, you need to exit the loop by using a “break” statement. However, if you are inside of a

Loops (for, while, do..while) are used often in code?especially nested loops. Eventually, you need to exit the loop by using a “break” statement. However, if you are inside of a

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

‘ Determine whether the IE Close menu item is enabled’ Note: requires the GetRegistryValue routine, you can find it in the CodeBank’ Example:’ MsgBox “Close is enabled: ” & GetIECloseEnabledPublic

‘ Set whether the IE Close menu item is enabled’ Note: requires the SetRegistryValue, CheckRegistryKey and CreateRegistryKey ‘ routines, you can find them in the CodeBank’ Example:’ SetIECloseEnabled FalsePublic Sub

‘ 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