Method abs(int a)
Return type: int
Member of: java.lang.Math
[api documentation ] [ main menu]

Examples of how the element is used (one line per example):
[add your own example]

1 return Math.sqrt(Math.abs(point1.x-point2.x)*Math.abs(point1.x-point2.x)+Math.abs(point1.y-point2.y)*Math.abs(point1.y-point2.y));
2 Math.abs(extent.width), Math.abs(extent.height));
3 Math.abs(r.width), Math.abs(r.height));
4 return new MultiplexorID(Math.abs(random.nextInt()));
5 return Math.abs(LocalSelectionTransfer.getInstance().getSelectionSetTime() - event.time) < DROP_TIME_DIFF_TRESHOLD;
6 answer = Math.abs(new Random().nextInt() % 100) + 1;
7 now.add(field, 1 - Math.abs(value));
8 balancer_seq[i] = Math.abs(r.nextInt());
9 String dd = String.valueOf(Math.abs(q));
10 int index = Math.abs(rand.nextInt()) % listeners.size();
11 Math.abs(result - expectedResult) <= tolerance);
12 int i = Math.abs(rnd.nextInt());
13 g.drawRect(pt1.x < pt2.x ? pt1.x : pt2.x, pt1.y < pt2.y ? pt1.y : pt2.y, Math.abs(pt2.x - pt1.x), Math.abs(pt2.y - pt1.y));
14 int gcd = greatestCommonDivisor(Math.abs(numerator), denominator);
15 if (Math.abs(currDif) > Math.abs(dif)) {
16 assertTrue(Math.abs(screenDimension.width - (r.x + r.width) - r.x) <= 1);
17 float xscale = (float)size.width/Math.abs(im.getWidth());
18 code = Math.abs(code);
19 int dx = Math.abs(xend-xstart);
20 if (sx < rx && Math.abs(sy-ry) <= Math.abs(sx-rx)) { // east
Java and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other Countries.