Java borrowed most of their operators from C

Arithmatic
+,-,*,/ are the standard plus,minus,times,divide
% is remainder (modulo)

There are a few shortcuts
op++ means op = op+1
op-- means op = op-1
-op negates the op

Comparisons
>,>=,<,<=,==,!= are greater-than, greater-than or equal, less-than,
less-than or equal, equals, not-equals

Bit operators (if you don't know, you almost definitely don't need them)
<<,>>,>>>> are shift-left, shift-right-keep sign, and shift-right-unsigned
&,|^,~ are bit-wise and,or,xor,not

Assignment
= is assign (as opposed to equals, different, and importantly (and
confusingly) so)
all the arithmetric and bit operators have a contraction that goes with
assignment, like
like this
op1 += op2
which means
op1 = op1 + op2

There are a few more obscure operators like ?: which is a shothand if-else
comment. Then, [], . , (), and "new" are all operators too, but that is
getting retentive.

C also has ! which inverts the truth value of the operand, but I'm not sure
if it is in Java

I hope that isn't too programmer lessony.  The important ones are the
distinction between equals and assign (as people often mess it up), and !=
which is the answer to your question.

Jeff
-- 
----------------------------------------------------------------------------
Computer Science is as much about computers as astronomy is about telescopes
        -- Edsger Wybe Dijkstra (1930-2002)
----------------------------------------------------------------------------


[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/IMSolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/vassalengine/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to