Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: urgent help!

  1. #1
    Junior Member
    Join Date
    Mar 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default urgent help!

    this is part of my program....
    Last edited by elcompar; April 23rd, 2012 at 01:50 PM.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,421
    Thanks
    49
    Thanked 2,215 Times in 2,188 Posts

    Default Re: urgent help!

    Please explain the problem.
    how to subtracrt 1 from 255
    Can you explain what you are trying to do to the byte values?

    bytes can contain values from 0 to 255.

    The compiler will convert byte values to ints which will allow you to add 1 to 255 and get 256
    To get 0 from the int value of 256 cast the int to a byte
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Need urgent help regarding java word wrap function.. URGENT
    By coldice in forum What's Wrong With My Code?
    Replies: 3
    Last Post: August 16th, 2011, 05:43 AM
  2. its urgent
    By talha07 in forum Java Networking
    Replies: 3
    Last Post: January 22nd, 2011, 12:44 PM
  3. [SOLVED] need help urgent
    By rupa in forum Java Servlet
    Replies: 1
    Last Post: January 19th, 2011, 01:41 PM
  4. PLEASE HELP ME .. IS URGENT
    By chela02 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: December 18th, 2010, 04:37 PM
  5. Replies: 1
    Last Post: May 4th, 2009, 06:30 AM