Results 1 to 2 of 2
  1. #1
    LukasHopkins is offline Member
    Join Date
    Aug 2012
    Posts
    6
    Rep Power
    0

    Default Help with fixing a error

    class A{
    byte bitval1 = 3;
    byte bitval2 = 4;
    static byte sumIt(byte a, byte b){
    return a + b;
    }
    }

    class B{
    A obj = new A();
    byte result = A.sumIt(obj.bitval1,obj.bitval2);

    //byte c = 2;
    //byte d = 5;

    //c+= 4;
    //d = d + 4;
    }

    class c3p1{
    public static void main(String[] args){

    }
    }

    \\ there is an error in class c3p1 that causes a compilation error. How can I fix that and make it print the result?? Thanks!

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,417
    Rep Power
    25

    Default Re: Help with fixing a error

    a compilation error.
    Please post the full text of the error message.

    Also edit the post and wrap the code in code tags to preserve its formatting.
    See: BB Code List - Java Programming Forum
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Help with fixing NullPointerException error
    By Luinithil in forum New To Java
    Replies: 7
    Last Post: 01-12-2012, 03:57 PM
  2. help fixing error in constructor
    By katiebear128 in forum New To Java
    Replies: 3
    Last Post: 10-13-2011, 03:40 AM
  3. [SOLVED] I need help fixing an error
    By leonardjr in forum New To Java
    Replies: 8
    Last Post: 02-21-2009, 08:33 PM
  4. help with fixing my assignment.please...error
    By Jin-enigma-PL in forum New To Java
    Replies: 4
    Last Post: 02-05-2009, 12:12 AM
  5. Exception Error need help fixing
    By skinnybones in forum New To Java
    Replies: 2
    Last Post: 12-03-2007, 07:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •