Need help finding errors.

I need help finding the error(s) in my code. I am writing a program to convert decimal to binary. It is not an application. It is more of a blue print for an object.
The Program is:
public class DecimalToBinary
     private long decimal;
     private long binary;
//Constructor setes the variable decimal and coverts and sets the variable binary
public DecimalToBinary(int decValue)
     decimal = (long)decValue;
     binary = convert(decValue);
//This method does the actual conversion from decimal to binary
public long convert(long dec)
          long remainder = 0; //Start with initial value
     String bin = ""; //Start with a blank string
          while (dec > 0)
          remainder = dec%2; //get remainder
               dec /=2; //get the number divided by 2
               bin = remainder + bin; //concatenate the remainder to string
     return Long.parseLong(bin);
     //Accesor methods to get the value of decimal
public long getDecimal()
     return decimal;
// Accessor Method to return binary Value
public long getBinary()
     return binary;
// To string to represent Object.
public String toString()
     String result = "";
result = decimal +"\t\t\t" +binary;
     name1.getDecimal()     
     return result;
The error I am getting is:
DecimalToBinary.java:56: ';' expected
     name1.getDecimal()     
     ^
1 error
----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete.
I've tried putting the ; in there but it doesn't help and only throws another error.

Did you read the error message?
DecimalToBinary.java:56: ';' expected
name1.getDecimal() What is missing? Can you see where on the line of code it has identified that the missing thing is?

Similar Messages

  • I need help with error ORA-06502: numeric or value error

    Hi, all, i need help finding the error here, im getting a numeric or value error when i add information to the variable vlcadena when vlcadena is a clob type, and i check the length of the vlcadena variable and sometimes makes the error at 8000 characters some other times 32k i have no idea whats happening, does anyone have a clue?
    PROCEDURE REGISTRO_551 (
    VPNUMPARTE IN PARTESC.NUMPARTE%TYPE,
    VPFRACCION IN IMPOMAT.FRACCIONMEXIMPO%TYPE,
    VPDESCRIPCION IN PARTESC.DESCESPANOL%TYPE,
    VPVALORDLS IN IMPOMAT.VALORDOLARES%TYPE,
    VPCANTIDAD IN IMPOMAT.CANTIDAD%TYPE,
    VPUNIMED IN PARTESC.UNIMEDPARTE%TYPE,
    VPCANTIDADTARIFA IN IMPOMAT.CANTIDAD%TYPE,
    VPVALORAGREGADO IN EXPOPT.VALORAGREGADO%TYPE,
    VPPAISORIGEN IN PARTESC.PAISORIGEN%TYPE,
    VPCOMPVEND IN PARTESC.PAISORIGEN%TYPE,
    VPTIPOFRACCION IN IMPOMAT.TIPOFRACCION%TYPE,
    VPPESONETO IN IMPOMAT.PESONETO%TYPE,
    VPTIPOMONEDA IN MIMPOMAT.TIPOMONEDAEXTRANJERA%TYPE
    ) AS
    BEGIN
        vgproceso := 207310;
        vllong2:=length(vlCadena);
        vlCadena:=vlCadena||'551'||'|'; --1. TIPO DE REGISTRO
        vgproceso := 207311;
        vllong2:=length(vlCadena);
        vlCadena:=vlCadena||VPFRACCION||'|'; --2. FRACCION
        vgproceso := 207312;
        vllong2:=length(vlCadena);
        QUITA_ENTERS(NVL(VPDESCRIPCION,' '),VLTEMP);
        IF LENGTH(VLTEMP)>80 THEN
            VLTEMP:=SUBSTR(VLTEMP,1,80);
        END IF;
        vgproceso := 207313;
        vllong2:=length(vlCadena);
        IF VLTEMP IS NULL THEN
            vlCadena:=vlCadena||'|'; --3. DESCRIPCION
        ELSE
            vlCadena:=vlCadena||VLTEMP||'|'; --3. DESCRIPCION
        END IF;
        vgproceso := 207314;
        vllong2:=length(vlCadena);
        IF VPNUMPARTE IS NULL THEN
            vlCadena:=vlCadena||'|';--4. NO. DE PARTE
        ELSE
            vlCadena:=vlCadena||VPNUMPARTE||'|';--4. NO. DE PARTE
        END IF;
        vgproceso := 207315;
        vllong2:=length(vlCadena);
        vlCadena:=vlCadena||VPVALORDLS||'|'; --5. VALOR MERCANCIA
        vgproceso := 207316;
        vllong2:=length(vlCadena);
        vlCadena:=vlCadena||VPCANTIDAD||'|'; --6. CANTIDAD COMERCIAL
        vgproceso := 207317;
        vllong2:=length(vlCadena);
        IF VPUNIMED IS NULL THEN
            VPDESCERROR:='ALGUNA PARTIDA CON FRACCION '||VPFRACCION||' NO TIENE UNIDAD DE MEDIDA';
        END IF;
        vgproceso := 207320;
        GET_CATGRAL('ADUANAS','UNIMED',NVL(VPUNIMED,' '),CL_D1,CL_D2,CL_D3,CL_D4,CL_V1,CL_V2,CL_V3,CL_CATG);
        IF CL_V2=0 THEN
           vlCadena:=vlCadena||VPUNIMED||'|'; --7. UNIDAD MEDIDA COMERCIAL
        ELSE
            SELECT TO_CHAR(TRUNC(CL_V2)) INTO VLUMCOMERCIAL FROM DUAL;
            IF LENGTH(VLUMCOMERCIAL)=1 THEN
                VLUMCOMERCIAL:='0'||VLUMCOMERCIAL;
            END IF;
            vlCadena:=vlCadena||VLUMCOMERCIAL||'|'; --7. UNIDAD MEDIDA COMERCIAL
        END IF;
        vlCadena:=vlCadena||VPCANTIDADTARIFA||'|';--8. CANTIDAD TARIFA
        vlCadena:=vlCadena||VPVALORAGREGADO||'|';--9. VALOR AGREGADO
        GET_CATGRAL('ADUANAS','CONFADU','IVIN-REG',CL_D1,CL_D2,CL_D3,CL_D4,CL_V1,CL_V2,CL_V3,CL_CATG);
        vlCadena:=vlCadena||CL_D1||'|'; --10. VINCULACION
        vlCadena:=vlCadena||CL_D2||'|'; --11. METODO DE VALORACION
        vlCadena:=vlCadena||'|'; --12. MARCA
        vlCadena:=vlCadena||'|'; --13. MODELO

    If the expected maximum length of the concatenated string is less than 32K, then use VARCHAR2 and at the end convert to CLOB if necesary.
    :p
    PS: At what line in the code does it give the error?
    Edited by: LKBrwn_DBA on Aug 20, 2009 2:49 PM

  • Need help finding my iphone serial number but my phone is dead

    Need help finding my iphone serial number but my phone is dead

    no one here can help you find it.

  • I need help finding this hp hard drive for dv6521eo

    I need help finding this hp hard drive and memory  for dv6521eo

    Hi:
    You can purchase any SATA II 2.5" notebook hard drive up to 500 GB in size.
    Memory is PC2-6400.
    Paul

  • HT1349 I need help finding an old library that itunes states my ipod is already linked to

    I need help finding an old library that it states my ipod is already linked to.  My computer recently had a terrible virus and needed to be wiped clean.  I had to redownload itunes and I bought several songs.  I want to add them to my old library because I had several cd's that I had uploaded.  Is there a way to find that old library and combine them without having to erase all the songs that are currently on my ipod???  Thanks

    Umm.  If you wiped the hard drive, then all old libraries are gone unless you have them on backup.

  • Need help finding a driver for my hp webcam . My computer say I dont have a camera but I do.

    Need help finding my camera[webcam] on my computor.

    Can you provide us with your computer model number?  Take a look in Device Manager to see if there is an Imaging Devices group that includes the webcam.  If not, is there an Unknown Device listed?  This would indicate that your webcam is detected, but there is no driver installed.  We can help you find the correct driver if that is the case.  Let's start with the computer model number.  Thanks.
    I am an HP employee. The opinions expressed are my own and not those of HP.

  • Need help with error message 213:8

    Need help with error message 213:8, this error message prompted after re-installing CS5.5 on the same machine (W7 Pro)
    Thanks.

    Hi TKA_,
    Please try the solutions mentioned on following forum thread.
    http://support.muse.adobe.com/thread/1305941?start=0&tstart=0
    Let me know if it works?
    Regards,
    Sumit Singh

  • Need help finding Sound and Vibration Toolkit Example Files

    I need help finding some Sound and Vibration Toolkit Example Files?
    http://www.ni.com/white-paper/3779/en
    From this link you get:  getting_started_otb.llb
    The missing files are:
    OAT Truncate Time Indices.vi
    Speed profile.ctl
    oa_Config Time or RPM Segment.vi
    svl-Complex Datatype Default.vi
    Running Windows 7, LabVIEW 2011, 32bit
    Sound and Vibration Measurement Suite
    Sound and Vibration Toolkit
    Thanks,
    -SS
    Solved!
    Go to Solution.
    Attachments:
    License S and V.png ‏4 KB

    SS,
    You can find these files here:
    C:\Program Files (x86)\National Instruments\LabVIEW 2011\vi.lib\addons\Sound and Vibration\Order Analysis\Resample Order Tracking\SubVIs
    C:\Program Files (x86)\National Instruments\LabVIEW 2011\vi.lib\addons\Sound and Vibration\Order Analysis\Tach Process\SubVIs
    C:\Program Files (x86)\National Instruments\LabVIEW 2011\vi.lib\addons\Sound and Vibration\Order Analysis\Resample Order Tracking\SubVIs
    svl-Complex Datatype Default.vi changes to svc-Complex Datatype Default.vi
    C:\Program Files (x86)\National Instruments\LabVIEW 2011\vi.lib\addons\_NISVFA\_Shared subVIs\Common
    Make sure you are license activated, and you will have to dig through the *vi and relink a subvi.
    Then you should get a white arrow.
    -SS 

  • HT4061 i need help finding my iphone 4

    i need help finding my iphone4.  i didnt have the app find my iphone i bought the phone from my friend ... so i dont know the serial number but i do have his name and phone number also it carrier plan .... i need to freeze the phone they are able to make call to my family member that have iphone

    If you did not set up the find my iphone feature on the iphone itself then you cannot track it.
    Change your passwords and alert your carrier

  • HT5622 I need help finding a movie that I downloaded, can anyone help me with this?

    Hello, I need help finding a movie that I downloaded, can anyone help me with this?

    If you downloaded it to your iTunes library it will be in the Movies folder.  If you downloaded it to an iOS device you will find it in the Videos app.  This explains how to redownload previously purchased videos (available in some locations as long as the studio permits it): http://support.apple.com/kb/PH12283.

  • I lost my iPod I need help finding it.

    I lost my iPod and need help finding it. It took me a long time to save my money for someone to come and still it please help me

    - If you previously turned on the FIndMyiPod feature and location service is on, and wifi is on and connected go to iCloud, sign in, and go to FindMyiPhone. It the iPod has been restored it will never show up.
    - Report to police and change the passwords fro all accounts used on the iPod.
    - Apple will not help
    Reporting a lost or stolen Apple product

  • Need help finding the best Mac for gf

    hi I need help finding the best desktop. I am looking to buy MAC for gf.
    she uses final cut program question is does the GB/RAM/STORAGE matter on performance?
    She has a 2009 Apple computer I want to upgrade her to a new one
    I Dont know much when it comes to specs. She edits tons of videos and pictures.
    what's recommended for a video/photo editor that's good in performance ?

    Pro consumer might go with iMac even.
    Final Cut Pro latest benefits from dual AMD graphics.
    Video is one animal, graphics a much different.
    Great site full of performance, buying and configuration ideas:
    MacPerformance Go to the main topics
    I think you need to get clear on budgets. start with mid range and add all the options and can spend $4,000 or $7,000.
    Go to the Mac Store and do some looking and Google for reviews of software, hardware of course.
    Barefeats
    Rumors Pro
    Visit the forum for FCP-X would be a place to start.
    Final Cut Pro X

  • I need help finding photos just downloaded to Lightroom...they only show up in "previous downloads" and not in a folder in my pictures

    I need help finding phots just downloaded to lightroom...they only show up in "prevoious downloads" and not in a folder in my pictures.  what can I do to correct this?

    Also, please be aware that Lightroom is not a file browser like your operating system Finder or Explorer is. If the photos are not in the folder you expected them to be in, it is because you (accidentally) imported them into a different folder.

  • TS1424 i need help finding a purchase that somebody made on my cedit card without my knowledge to itunes and i want to file a claim

    i need help finding a purchase that somebody made on my cedit card without my knowledge titunes and i want to file a claim

    You can view purchases via Store > View My Account on your computer's iTunes (and you can view subscriptions). If you want to contact iTunes support then you can do so via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Need help finding a audio system ( stressed)

    I have cd with over 100 songs , and I need help finding  a boombox  that will play the CD anyone have any idea, I got no help from the store.

    here are the  specifications  for Philips eXpanium eXp 2461 , if somone can help me find a boomboox with simular specifications it would very helpful
    Philips eXpanium eXp 2461 - CD / MP3 player
    CD System
    CD system type CD / MP3 player
    Media load type Top-load
    Playback modes Repeat all,
    Resume play,
    One track repeat
    CD system response bandwidth -19980.0 Hz
    Signal-to-noise ratio 85.0 dB
    CD shockproof memory 45 seconds
    MP3 shockproof memory 100 seconds
    CD-R compatible Yes
    CD-RW compatible Yes
    CD track programming Yes (50 tracks)
    Digital audio standards supported MP3
    Supported bit rate 32 - 320Kbps
    General
    Product type CD / MP3 player
    Weight 8.0 oz
    Carrying Case
    Case type None
    Built-in Display
    Audio system built-in display LCD
    Audio Features
    Sound effects Digital Dynamic Bass Boost (Digital DBB)
    Sound output mode Stereo
    Additional features

Maybe you are looking for