Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: compute the difference between two dates

import java.util.*;
public class DifferenceDate
{
        public static void main(String[] av) {
                Date date1 = new GregorianCalendar(2

Java: How to append data to a File

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
public class Append_File
 {
  public static void main(String[]

Java: How to read BLOBs data from database

import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import j

Java: How to verify If a date is before another date

import java.util.Calendar;
import java.util.Date;
public class DateBefore 
{
  public static void main(String[] args)
  {
    Date today = new

Java: How to get the TimeZone.

import java.text.SimpleDateFormat;
import java.util.Date;
public class TimeZone
{
  public static void main(String[] args)
  {
    Date date =

Java: Modulus Operator Example

public class Modulo {
  public static void main(String[] args) {
    int i = 100;
    double d = 2;
    System.out.println("i mod 10 = " + i % 6);

Java-JDBC: using addBatch() to insert record

import java.sql.BatchUpdateException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLExcept

JavaMail: Get Email Header

import java.util.Enumeration;
import java.util.Properties;
import javax.mail.Authenticator;
import javax.mail.Folder;
import javax.mail.Header;
impor

Java: Reading and Writing Serialized Data via Socket

  import java.net.*;
  import java.io.*;
  import java.util.Date;
public class SocketSerializable
{
    public static void main(String[] argv) {

Java: handle JButton click events

import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
public class JButtonEvent
{
  public static void main(S

Java: How to divide one BigDecimal from another BigDecimal

import java.math.BigDecimal;
public class BigDecDiv
 {
  public static void main(String[] argv) throws Exception
  	{
    BigDecimal val1 = new BigDe

Java: Access a derby database via JDBC

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

Java: send a multipart/mixed message

import java.util.Date;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
imp

Java: How to updating LinkedList Items

import java.util.LinkedList;
public class Ex_LinkedList
 {
  public static void main(String[] a) {
    LinkedList ma_Liste = new LinkedList();
    ma

Java: How to convert a string to an int

public class StringToInt 
{
  public static void main(String[] args) 
 {
    String unString = "152";
    int unInt = Integer.parseInt(unString);