About 50 results
Open links in new tab
  1. What does the ^ operator do in Java? - Stack Overflow

    Jan 2, 2010 · It is the Bitwise xor operator in java which results 1 for different value of bit (ie 1 ^ 0 = 1) and 0 for same value of bit (ie 0 ^ 0 = 0) when a number is written in binary form.

  2. java - Math.random () explanation - Stack Overflow

    Nov 1, 2011 · This is a pretty simple Java (though probably applicable to all programming) question: Math.random() returns a number between zero and one. If I want to return an integer between zero …

  3. Getting random numbers in Java - Stack Overflow

    I would like to get a random value between 1 to 50 in Java. How may I do that with the help of Math.random();? How do I bound the values that Math.random() returns?

  4. How do I properly use the java.lang.Math? - Stack Overflow

    I believe I have imported the tool to allow the program to calculate basic math operations by using "java.lang.Math;" I understand * is multiplication, / is division, + is addition, - is subtraction, and % …

  5. math - Best way to represent a fraction in Java? - Stack Overflow

    32 Apache Commons Math has had a Fraction class for quite some time. Most times the answer to, "Boy I wish Java had something like X in the core library!" can be found under the umbrella of the …

  6. How do I generate random integers within a specific range in Java ...

    Java 7+ In Java 1.7 or later, the standard way to do this (generate a basic non-cryptographically secure random integer in the range [min, max]) is as follows:

  7. Java rounding up to an int using Math.ceil - Stack Overflow

    Aug 21, 2011 · Java rounding up to an int using Math.ceil Asked 14 years, 6 months ago Modified 3 years, 5 months ago Viewed 218k times

  8. hibernate - java.lang.ClassCastException: java.math.BigDecimal cannot ...

    java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.Long Asked 6 years, 4 months ago Modified 6 years, 4 months ago Viewed 39k times

  9. math - how to use ln in Java - Stack Overflow

    Apr 2, 2010 · I'm trying to use this formula in JAVA : (-ln(1-L))/L I'm not sure how to use ln in java.

  10. how to use math.pi in java - Stack Overflow

    Sep 26, 2012 · how to use math.pi in java Asked 13 years, 5 months ago Modified 6 years, 5 months ago Viewed 583k times