Jtest logo




Contents  Previous  Next  Index

OPT.AAS


Use abbreviated assignment operators

Description

This rule flags code that should use the abbreviated assignment operator, but does not.

In order to write programs more rapidly, you should use the abbreviated assignment operator because doing so causes some compilers run faster.

Example

 package OPT;
 public class AAS {
     void method () {
         int i = 3;
         String s = "fu";
         i = i - 3; //should use "-="
         s = s + "bar"; //should use "+="
     }
 }

Repair

Use the abbreviated assignment operators.


Contents  Previous  Next  Index

ParaSoft logo
(888) 305-0041 info@parasoft.com Copyright © 1996-2001 ParaSoft