devxlogo

August 28, 2001

Win32 Equivalents for C Runtime Functions

Many of the C runtime functions have direct equivalents in the Win32 application programming interface (API). However, when you use C-Runtime functions, you need to have C-Runtime startup code and

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

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

Writing Objects To Files

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

Determining the Operating System at Runtime

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 : “

Code to Restart or Shut Down Your 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