All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.samples.java.ex.DDC_Sample Maven / Gradle / Ivy

Go to download

An auxiliary findbugs.sourceforge.net plugin for java bug detectors that fall outside the narrow scope of detectors to be packaged with the product itself.

The newest version!
package ex;

import java.util.Date;

public class DDC_Sample {
    public void test1(Date d1, Date d2) {
        if (d1.equals(d2) || d1.after(d2))
            System.out.println("d1 is greater than or equal to d2");
        else
            System.out.println("d1 is less than d2");
    }

    public void test2(Date d1, Date d2) {
        if (d1.before(d2) || d1.equals(d2))
            System.out.println("d1 is less than or equal to d2");
        else
            System.out.println("d1 is greater than d2");
    }

    public void test3(Date d1, Date d2) {
        if (d1.before(d2) || d1.after(d2))
            System.out.println("d1 is not equal to d2");
        else
            System.out.println("d1 is equal to d2");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy