devxlogo

Tip Bank

Checking the Free Space on a Drive

You can obtain the free space details of each drive by executing this stored procedure: Master..xp_fixeddrivesdrive MB free—– ———–C 1317D 7194E 3930(3 row(s) affected)

Exiting a Nested Loop

Sometimes, you need to exit a nested loop early, and the break; statement will only let you exit one level of a loop. Use a flag to indicate if the

Sorting a String Alpabetically

To Sort a String in alphabetical order instead of ASCII order (i.e A,a,B,b not A….Z,a….z), use the Collator class from the Java.text package.Here

Reading Properties from a File

It’s not too much trouble to read a few arguments from the command line. It really becomes a problem if you have to read 50 or more arguments. One solution

Avoid Errors on Assigning Null Values

Whenever you read a database field, concatenate an empty string to the field value before assigning it to a variable or control property. This prevents the program from giving an