|
|
|
1000 Java Tips ebook
|
|
 

Free "1000 Java Tips" eBook is here! It is huge collection of big and small Java
programming articles and tips. Please take your copy here.
Take your copy of free "Java Technology Screensaver"!. |
|
Why I can not compile it:
|
JavaFAQ Home » General Java

Question: Why I can not compile it:
byte aa = 2;
aa = - - aa;
I think the construction: - -aa is equivalent to -(-aa)...
Answer: The Java programming language
supports various arithmetic operators for all floating-point and integer
numbers. These operators are + (addition), - (subtraction), * (multiplication),
/ (division), and % (modulo).
In your example aa is a byte variable. You can use --aa instead..
***************************************
Our older tips: March 22, 2001 - October 21, 2002
read here.
All published and not published on site tips you can find
here
Printer Friendly Page
Send to a Friend
..
Search here again if you need more info!
|
|
|