Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #22734

Re: hello here is a copy of a copy program on the net .

X-Received by 10.224.72.199 with SMTP id n7mr22566406qaj.5.1362527426644; Tue, 05 Mar 2013 15:50:26 -0800 (PST)
X-Received by 10.50.161.225 with SMTP id xv1mr1629052igb.15.1362527426428; Tue, 05 Mar 2013 15:50:26 -0800 (PST)
Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.bbs-scene.org!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!dd2no7325205qab.0!news-out.google.com!p7ni1qai.0!nntp.google.com!dd2no7325200qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.programmer
Date Tue, 5 Mar 2013 15:50:25 -0800 (PST)
In-Reply-To <629a4687-24e7-49cc-b8b0-e7f91fbf79bd@googlegroups.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=69.28.149.29; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T
NNTP-Posting-Host 69.28.149.29
References <026b0609-ef87-470e-b899-fc00529bb4ce@googlegroups.com> <629a4687-24e7-49cc-b8b0-e7f91fbf79bd@googlegroups.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <c0a27d29-f02b-460f-bf22-e1fe7c15ef43@googlegroups.com> (permalink)
Subject Re: hello here is a copy of a copy program on the net .
From Lew <lewbloch@gmail.com>
Injection-Date Tue, 05 Mar 2013 23:50:26 +0000
Content-Type text/plain; charset=ISO-8859-1
Lines 24
Xref csiph.com comp.lang.java.programmer:22734

Show key headers only | View raw


giovann...@ wrote:
> thank you
> display is just a control to see if read
> but if I wanted to see how hexaa instead of decimal?
> And how to change the value read
> for example by inverting the value?
> 
> b [i] = - (b [i]);

http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#format(java.lang.String, java.lang.Object...)
http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax
http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html

String rep = "";
for ( byte by : b )
{
  rep += String.format( "%2.2x ", by);
}

b [i] = - (b [i]);
is a perfectly valid expression. It has gotchas; the right-hand side is evaluated as an 'int' 
and undergoes a narrowing conversion on the assignment.

--
Lew

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

hello here is a copy of a copy program on the net . giovannich1965@gmail.com - 2013-03-05 08:44 -0800
  Re: hello here is a copy of a copy program on the net . "John B. Matthews" <nospam@nospam.invalid> - 2013-03-05 11:56 -0500
  Re: hello here is a copy of a copy program on the net . Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-03-05 12:01 -0500
  Re: hello here is a copy of a copy program on the net . giovannich1965@gmail.com - 2013-03-05 11:20 -0800
    Re: hello here is a copy of a copy program on the net . Lew <lewbloch@gmail.com> - 2013-03-05 15:50 -0800
  Re: hello here is a copy of a copy program on the net . giovannich1965@gmail.com - 2013-03-05 11:21 -0800
  Re: hello here is a copy of a copy program on the net . giovannich1965@gmail.com - 2013-03-06 12:40 -0800

csiph-web