5 Replies Latest reply on Jul 5, 2008 1:26 PM by 800282

    DataType BigInteger

    807589
      Hello,

      I'm confused to put the value for a variable which is declared BigInteger datatype.
      Please look at part of the code.

      EventType eventobj = objFact.createEventType();
      eventobj.setEVENTID(123456);
                eventobj.setTITLE("First Event");
      I declared datatype for EVENTID is BigInteger.So I use 123456.This gives an error
      The method SetEVENTID(BigInteger) in the type EventType is not applicable for the arguments(int)
      Please suggest where I'm wrong?

      Thanks
      -S.Singh
        • 1. Re: DataType BigInteger
          800282
          shobhit_onprob wrote:
          ...
          EventType eventobj = objFact.createEventType();
          eventobj.setEVENTID(123456); // <---------------------------------------------- HERE
                    eventobj.setTITLE("First Event");
          I declared datatype for EVENTID is BigInteger.So I use 123456.This gives an error
          The method SetEVENTID(BigInteger) in the type EventType is not applicable for the arguments(int)
          Please suggest where I'm wrong?
          You're providing an int as a parameter, not a BigInteger.
          • 2. Re: DataType BigInteger
            807589
            Thanks for reply.

            Please tell me an example what should I provide for BigInteger.Also please tell me dfference b/w these two that is int and BigInt.

            -S.Singh
            • 3. Re: DataType BigInteger
              800282
              shobhit_onprob wrote:
              Thanks for reply.

              Please tell me an example what should I provide for BigInteger.
              Instantiate a BigInteger and provide a String to the constructor that represents the numerical value. You instantiate an object by using the 'new' keyword.
              [http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html]
              Also please tell me dfference b/w these two that is int and BigInt.
              ...
              A primitive int can hold integer values from -2147483648 up to 2147483647 (-(2^31) up to (2^31)-1)
              A BigInteger can hold an arbitrary integer value.
              • 4. Re: DataType BigInteger
                807589
                Thanks for giving some valuable suggestions.
                • 5. Re: DataType BigInteger
                  800282
                  shobhit_onprob wrote:
                  Thanks for giving some valuable suggestions.
                  You're welcome.