Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > advantages of shorthand operator

Reply
Thread Tools

advantages of shorthand operator

 
 
asit
Guest
Posts: n/a
 
      06-29-2008
shorthand assignment operator provides two advantages
1>needs less typing
2>java compiler handles in an efficient way

What is the efficient way ???
 
Reply With Quote
 
 
 
 
John B. Matthews
Guest
Posts: n/a
 
      06-29-2008
In article
<(E-Mail Removed)>,
asit <(E-Mail Removed)> wrote:

> shorthand assignment operator provides two advantages
> 1>needs less typing
> 2>java compiler handles in an efficient way
>
> What is the efficient way ???


They are called Compound Assignment Operators, and you don't have to
read very far in the relevant section to learn what efficiency they
afford:

<http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html>

Now that you know what they're called, the relevant section will be easy
to find

--
John B. Matthews
trashgod at gmail dot com
home dot woh dot rr dot com slash jbmatthews
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      06-29-2008
On Sun, 29 Jun 2008 07:00:48 -0700 (PDT), asit <(E-Mail Removed)>
wrote, quoted or indirectly quoted someone who said :

>shorthand assignment operator provides two advantages
>1>needs less typing
>2>java compiler handles in an efficient way
>
>What is the efficient way ???


see http://mindprod.com/jgloss/mccarthyandoperator.html
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
Reply With Quote
 
Arne Vajh°j
Guest
Posts: n/a
 
      06-29-2008
Roedy Green wrote:
> On Sun, 29 Jun 2008 07:00:48 -0700 (PDT), asit <(E-Mail Removed)>
> wrote, quoted or indirectly quoted someone who said :
>> shorthand assignment operator provides two advantages
>> 1>needs less typing
>> 2>java compiler handles in an efficient way
>>
>> What is the efficient way ???

>
> see http://mindprod.com/jgloss/mccarthyandoperator.html


shorthand assignment != short circuit logical operator

Arne
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      07-03-2008
On Sun, 29 Jun 2008 16:08:30 -0400, Arne Vajh°j <(E-Mail Removed)>
wrote, quoted or indirectly quoted someone who said :

>shorthand assignment != short circuit logical operato


If he means cascaded assignment e.g.
a ^= b ^= a ^= b;
see http://mindprod.com/jgloss/cascadedassignment.html


if he means assignment operators e.g.

a += 2;

see http://mindprod.com/jgloss/assignmentoperator.html

--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shorthand operator for AND, NOT Archos Javascript 5 12-22-2011 09:54 AM
Shorthand for Property declaration in VB David W ASP .Net 0 01-17-2007 07:44 PM
Shorthand for namespaces Foxpointe XML 4 10-31-2006 09:41 PM
foreach shorthand unspammable@gmail.com C++ 2 03-25-2005 10:38 PM
kiwi biz q_'n <== Teeline shorthand for question Quean Computer Support 2 12-23-2004 07:08 AM



Advertisments