devxlogo

Tip Bank

When to Pass Parameters by Value

The main reason to pass parameters by value is to improve performance, which is somewhat of a paradox, because this is also one of the main reasons to pass by

Export Data Grid Content to an XML File

Assume that your Data Grid is not associated with any dataset. In the absence of any XML support functions, you can use the RenderControl method to extract the content into

Use the Robot Class for Automatic Keyboard and Mouse Control

This code uses the Robot class to give you automatic keyboard and mouse control. import java.awt.*;import java.awt.event.*;import java.io.IOException;import javax.swing.*;public class RobotDemo extends JFrame implements ActionListener{ //Store Keystrokes in an array

Incrementing Iterators

You can use iterators for a STL set object to loop through the set elements 1 by 1. But did you know you can also increment the iterator by more

Use Java to Extract All the Name-value Pairs from a URL

import java.net.*;import java.io.*;import java.util.*;import java.text.*;//Program to get all the cookies(name/pair values) from the URL passed as parameterpublic class GetCookieFromURL{ public static void main(String args[]) { try{ //create url by pass