Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Error message

  1. Oct 21, 2007 #1
    Hi can some one tell me why I can call union and not intersection.

    These are the error message "intersection(boolean) in IntergerSet
    cannot be applied to (boolean[])"
    where the arrow is.

    This is in JAVA

    Here is my code:
    //in main
    {
    set.union(arraySetB);
    ---> set.intersection(arraySetC);



    }


    //in anther class
    public void union(boolean other[])
    {
    boolean res[] = new boolean [SIZE];

    for(int i=0; i<SIZE; i++)
    if(arraySet==true||other==true)
    res = true;
    arraySet = res;



    }


    public void intersection(boolean other[])
    {
    boolean res[] = new boolean [SIZE];

    for(int i=0; i<SIZE; i++)
    if(arraySet==true&&other==true)
    res = true;
    arraySet = res;



    }


    Thanks
     
    Last edited: Oct 21, 2007
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you help with the solution or looking for help too?
Draft saved Draft deleted



Similar Discussions: Error message
  1. Fortran error messages (Replies: 0)

  2. Annoying debug messages (Replies: 13)

Loading...