Subtract java.lang.Number from java.lang.Nuber and assign to java.lang.Numb

I have 2 Number attributes in my class, I have to subtract one value from the other and set to another Number Object... how shd I do this?
C=A-B
all A,B,C are java.lang.Number Objects
Please let me know

That depends on what kind of number. Of course you could do this:
Number c = new Long(a.longValue()-b.longValue());But then you'd loose decimal digits. If on the other hand you'd use Double instead you might have higher precision as you liked ... and if any of those Numbers are BigDecimal things go totatly wonky ...
Basically you can't do this 100% correct without knowing what kind of Number objects you have to handle.

Similar Messages

  • Fetch Sales order number and PO number from ship to party and sold to party

    HI,
    I need to get Sales order number and PO number
    from ship to party and sold to party.
    I have only ______sold to party and ship to party and req del date_______ in selection screen as mandatory
    Please let me know
    Sreekanth

    Hi,
    You can do this:-
    SELECT VBELN FROM LIKP
    INTO TABLE T_DELIVERIES
    WHERE KUNNR = SHIP TO PARTY
    AND     KUNAG = SOLD TO PARTY
    AND LFDAT      = DEL DATE.
    You will get a table containing the list of deliveries.
    Use VBFA to get the sales orders from deliveries.
    SELECT VBELV FROM VBFA
    INTO TABLE T_SALESORDERS
    WHERE VBTYP_N = 'J'
    AND     VBELN  = T_DELIVERIES-VBELN.
    T_SALESORDERS WILL give you list of sales orders.
    From Sales Orders you can get Purchase orders through EKKN Table.
    Using EKKN pass T_SALESORDERS-VBELN and get corresponding EBELN.
    Regards,
    SUbhashini

  • Ive tried 2 new download cards from PC world now and they both say card number is invalid

    ive tried 2 new download cards from PC world now and they both say card number is invalid

    You need to contact Adobe directly using the link below. Use the dropdown menu for boxes (1) & (2) to scroll down the list and choose:
    1. Adobe Photoshop Elements
    2. Adobe ID, and signing-in
    3. Click on the blue button: Still need help? Contact us – then click the area marked chat 24/7, then click “start chat ”
    It’s usually possible to start a live chat, if an Adobe agent is free, and often to get the problem fixed right away. Have your serial number available. The agent can directly troubleshoot your system if you agree to activate the Adobe Connect add-on.
    Click here to get help now Contact Customer Care

  • I need to block a certain number from my daughters phone and need to know how to do it, help?

    I need to block a certain number from my daughters phone and need to know how to do it, help?

    Go on your account and under where it says plan, there is a tab for blocking calls but the block only lasts for 30days i think or more. You may have to re-apply the block if needed.

  • A simple Java program to be compiled with ojc and executed with java.exe

    Hi ,
    This thread is relevant to Oracle Java Compiler (file ojc) and jave.exe file.
    I have written a simple java program which consists of two simple simple classes and using the JDev's 10.1.3.2 ojc and java files , i'm trying to execute it after the successful compilation....
    The problem is that trying to run it... the error :
    Exception in thread "main" java.lang.NoClassDefFoundError: EmployeeTest
    appears.
    How can i solve this problem...????
    The program is as follows:
    import java.util.*;
    import corejava.*;
    public class EmployeeTest
    {  public static void main(String[] args)
       {  Employee[] staff = new Employee[3];
          staff[0] = new Employee("Harry Hacker", 35000,
             new Day(1989,10,1));
          staff[1] = new Employee("Carl Cracker", 75000,
             new Day(1987,12,15));
          staff[2] = new Employee("Tony Tester", 38000,
             new Day(1990,3,15));
          int i;
          for (i = 0; i < 3; i++) staff.raiseSalary(5);
    for (i = 0; i < 3; i++) staff[i].print();
    class Employee
    {  public Employee(String n, double s, Day d)
    {  name = n;
    salary = s;
    hireDay = d;
    public void print()
    {  System.out.println(name + "...." + salary + "...."
    + hireYear());
    public void raiseSalary(double byPercent)
    {  salary *= 1 + byPercent / 100;
    public int hireYear()
    {  return hireDay.getYear();
    private String name;
    private double salary;
    private Day hireDay;
    For compilation... i use :
    D:\ORACLE_UNZIPPED\JDeveloper_10.1.3.2\jdev\bin\ojc -classpath D:\E-Book\Java\Sun_Java_Book_I\Corejava EmployeeTest.java
    For execution , i issue the command:
    D:\ORACLE_UNZIPPED\JDeveloper_10.1.3.2\jdk\bin\java EmployeeTest
    NOTE:I tried to use the jdk of Oracle database v.2 but the error :
    Unable to initialize JVM appeared....
    Thanks , a lot
    Simon

    Hi,
    Thanks god....
    I found a solution without using Jdev.....
    C:\oracle_files\Java\Examples>SET CLASSPATH=.;D:\E-Book\Java\Sun_Java_Book_I\Corejava
    C:\oracle_files\Java\Examples>D:\ORACLE_UNZIPPED\JDeveloper_10.1.3.2\jdk\bin\javac EmployeeTest.java
    C:\oracle_files\Java\Examples>D:\ORACLE_UNZIPPED\JDeveloper_10.1.3.2\jdk\bin\java EmployeeTest
    What does Ant has to do with this?Sorry, under the Ant tree a classpath label is found....I'm very new to Java and JDev...
    You need to include the jar file that has the Day method in it inside project properties->libraries.I have not .jar file.. just some .java files under the corejava directory.... By the way , I have inserted the corejava directory to the project pressing the button Add Jar/Directory.... , but the problem insists..
    Thanks , a lot
    Simon

  • HT4061 I upgraded and no longer have an iphone. Now my fiance nor anyone with an iphone can text me because it still wants to use iMessage even though I have removed my number from the icloud, apple, and itunes. I have no idea what more to do.

    We have already deleted my name and number from his iPhone, and tried re-adding it. It still lists my number as an iMessage. It is not feasible to ask everyone in my contact list with an iphone to turn that off so that they can text me. Please help. I've already done everything that I could find online, deleting my number out of everything and nothing has helped thus far. Thanks in advance.

    Hi tinkdgw99,
    If you are having issues receiving text messages after switching away from an iPhone, you may find the following article helpful:
    iOS: Deactivating iMessage
    http://support.apple.com/kb/TS5185
    Regards,
    - Brenden

  • Strange problem with how my iPhone (4S) sees a friend who recently moved his number from his old network and device to a new network and iPhone 3GS

    This is a weird one, so bear with me.
    My friend recently got an iPhone 3GS with a new SIM in it (3 network in the UK). I helped him set up the iPhone and got iMessage working between my mobile and his temporary number (07429...)
    In my Contacts I had two separate phone numbers for him: 07903... (his old number, on an old Sony Ericsson mobile with T-Mobile UK) and 07429... (the number that came with the 12-month contract I purchased for him; we called this his "temporary" number).
    His old number (07903...) was transfered over to his iPhone with no problems. His iPhone has worked flawlessly.
    But since that day I've had some really strange behaviour on my iPhone (a 4S, also on 3 UK): I removed his temporary number (07429...) from my contacts. But now when I try to text him at the old number (07903...) it bounces back at me as if the number doesn't exist. But if I try to text him at the temporary number (07429...) it works just fine and in my contacts and within Messages it appears as an iMessage-connect number.
    So I tried deleting everything and starting from scratch. Still the same behaviour.
    No one else is having this problem with him. I can call his old number (07903) just fine, I just can't text it.
    I'm guessing that there's something with the way Contacts works with iMessage that's caused the problem. It's as if my contacts have updated properly under-the-hood (iMessage *does* work just not with the right number).
    And yes, when I (or anyone) tries calling the temporary number (07429...) it's out of service. Which is correct. So it's not simply a case of *both* numbers being active.
    So this is very peculiar.
    In typing up this message it occured to me that I ought to try creating an all-new contact with some slight change in the name fields (e.g. include the middle initial) and see if I can get it to work properly. Then I ought to be able to change the name field (or just leave it alone, touch wood!).
    Thanks in advance for reading this far. It's difficult to explain this problem succintly!
    Cheers,
    Carey

    I've fixed my own problem.
    In the end, the issue was with iMessage on the other phone, not mine.
    While I had it connected to iTunes (the other phone, not mine), I could see that iTunes thought it was the temporary number (07429...). I turned iMessage off and back on again and the phone number in iTunes changed to the old (i.e correct) number (07903...).
    Subsequently, texts from my phone to the other phone showed up as blue-bubbled iMessages.
    Hope this helps someone!
    Thanks for reading, if you did.

  • I have installed Lightroom 5.6 on my Mac, but now it is asking for a serial number, and I only have a serial number from LR 4; how do I find the necessary number?

    I have installed Lightroom 5.6 as an upgrade but am unable to proceed because it wants a serial number; how do I attain the needed serial number?

    No, I did not have to purchase the upgrade. But here is what I believe my
    error was: earlier today, I upgraded to LR 5.6 on my laptop. Then I
    upgraded to the same on my desktop, but became confused and installed it
    TWICE.
    Is this the reason that Adobe is asking me to license Lightroom and to come
    up with a serial number? (I have my serial # from LR4, but it does not do.)
    Should I try to deactivate LR 5 and then try again to upgrade to it?
    Or am I still confused and need to purchase the LR 5.6 upgrade? Thanks for
    your help.
    On Thu, Aug 21, 2014 at 5:44 PM, John Waller <[email protected]>

  • Trying to reinstall CS5, but I've lost the Serial Number from Flash Professional 8, and it's no longer shown on my account page.

    Something like 10 years ago (2004ish), I bought Flash Professional 8, and I upgraded to CS5 back in 2011. Following a number of hardware upgrades, including a new hard drive, I need both serial numbers to reinstall; I've done so several times in the past, but now the Flash 8 number isn't on my account page anymore, and the original e-mail is gone. The chance of finding the box is basically nil, so am I just screwed?

    Helbereth I would recommend contacting our support team directly at Contact Customer Care and provide any alternate e-mail or phone numbers which the other software title may have been registered under.  You can find additional details on how to locate registered serial numbers at Find your serial number quickly - http://helpx.adobe.com/x-productkb/global/find-serial-number.html.

  • Need to delete the old page number from a combined file and replace it with the new number. is there a way for me to do that using JavaScipt

    is there a way of using JS to delete the old page number (1,3,32,78) on a combined PDF and inset it with a new page numbers (1,2,3,4) Thank you

    Depends. If the page numbers can be located by their location on the page then a script can be written to redact that area, and then add new page numbers in their place (or somewhere else).

  • I have just imported my number from giffgaff to 3 and now it seems i cant imessage.i'm using iphone 5, help please

    hi, my iphone 5 won't imessage

    At a guess you followed the process in HT1364 - iTunes for Windows: Moving your iTunes Media folder which would have moved the media folder to a new path of your choice. This process leaves the library database files back in the original location of <User's Music>\iTunes. Often people assume that all they need is now on the external drive and wipe the internal drive, or discard their old computer, before backing up the all important iTunes folder. If you have a backup of your user's profile folder from before the upgrade the iTunes library folder should be in there somewhere. Restore it to <User's Music> and your original library should pop back into existence. The external drive would need to have the same drive letter that it had previously.
    A more effective way to relocate the library is to move the entire iTunes folder to the external drive, then hold down shift when starting iTunes and keep holding until asked to choose or create a library. You would then choose the file iTunes Library.itl in the iTunes folder on the external drive. If this is the way you moved the library before then that is how you should now reconnect to it. Changing the media folder in preferences doesn't change which .itl database file is opened, nor does double-clicking on an .itl file directly.
    If you no longer have the original .itl file then you will have to build a new library and import the media to it. If you need to do this I would recommend you create a new library at F:\iTunes, then move your existing media folders inside F:\iTunes\iTunes Media before importing. This will avoid the creation of duplicates and make sure the library is in the correct shape going forwards.
    If you have an iPod or iOS device my scripts ImportDevicePlaylists and SyncStats may well let you recover ratings, play counts & playlists from the device.
    When you've fixed up your libray you should consider getting a second external drive to backup to.
    tt2

  • Downloaded it from the App store and can't find serial number?

    Will it be in my receipt emailed to me?

    The App store version does not require a serial number.
    Did you have a copy of Logic installed at one time?

  • How to extract row_id from PL/SQL procedure and assign that to batch script

    Hello Team,
    I am stuck with a requirement, wherein I am running a batch script and within the batch script I am calling a procedure which inserts a record in a table (Including a column named l_id).
    I need this generated l_id to be passed on as a variable to batch script after PL/SQL procedure completion. So that I can refer this same l_id to update the same record in the table again in the same batch script in the later part.
    Looking for some suggestions!!!!
    Thanks
    -Vj.

    789153 wrote:
    I am stuck with a requirement, wherein I am running a batch script and within the batch script I am calling a procedure which inserts a record in a table (Including a column named l_id). Operating system? Scripting language or command shell used?
    I need this generated l_id to be passed on as a variable to batch script after PL/SQL procedure completion. So that I can refer this same l_id to update the same record in the table again in the same batch script in the later part.
    Looking for some suggestions!!!!Don't do this using batch scripts. Batch scripts are very much inferior compared to stored PL/SQL code when it comes to managing databases processes and performing data crunching.
    Why can't this be written entirely in PL/SQL? And execution managed from either DBMS_JOB or DBMS_SCHEDULER ? And before answering that, consider the following:
    - what is the superior language, PL/SQL or shell script?
    - what provides tighter integration with the database, PL/SQL or shell script?
    - what provides proper security and access control, PL/SQL or shell script?
    As you can call SQL*Plus from a shell script to run PL/SQL, you can call a shell script from PL/SQL instead to run external commands and processes.
    Use the right tool for the job. And shell scripting is an excellent tool - but only when correctly used. Are you using it correctly? I strongly doubt that...

  • How does one register a non apple phone number so as use ichat and texting with that phone number?, How does one register a non apple phone number so as use ichat and texting with that phone number?

    How does one register a non apple phone number so as use ichat with that phone?

    Have you tried applying the update by going to Help>Updates within Photoshop Lightroom?  The update should be using the same licensing?  Did you perhaps customize the installation location?  Finally which operating system are you using?

  • My brother put a sim in phone then he took it out and put it into another phone but the number is still on imessage and i wanna delete the number and i dont wanna put money on the

    hhh

    Deactivate iMessage.
    Leave it as is and change the "Start New Converstations from" option in Settings > Messages.
    Do nothing....
    It really doesn't matter.
    What are you truly trying to accomplish?

Maybe you are looking for