devxlogo

Tip Bank

Find Out Who Is Accessing Your ServerSocket

Use this code to find out who is accessing your ServerSocket: Socket aSock = myServerSocket.accept();System.out.println (“Connection from : ” + aSock.getInetAddress().getHostAddress() + ‘:’ + aSock.getPort());

Close and Save All Except Your Current Window

When you’re working on large projects, it’s common to have a bunch of open windows cluttering your desktop. Closing all the windows you’re not working on is tedious. To automate

Warning Signs in SQL Code

SQL statements defined “inline” in source code are a warning sign that the implementation or the project design itself probably includes some land mines. If you see something like: String

Handling Events in BREW

BREW is very event-driven. As such, an application will get many events that it may not be expecting. Controls talk to themselves using events. The system sends events to the

Request Permissions with a MIDlet

A MIDlet requests permissions by declaring them in the application descriptor, using either MIDlet-Permissions or MIDlet-Permissions-Opt. Multiple permissions can be specified and are separated by commas. If a permission is