Some of the methods inside the math class.

25 Responses to “Java Programming Tutorial – 25 – Math Class Methods”

  • mrfarhankhanciit:

    bucky I m an Computer engineer n i find ur lectures v useful n informative
    keep up da excellent work
    u rox main m/
    farhan from Pakistan

  • ZeroBlitz36:

    @4thKyuubi
    Well you can this thing if you want
    max(1,max(2,max(3,4)))
    You get the picture

  • Dalwanaage:

    you made youtube better than universities. Bucky is the Man.

  • 4thKyuubi:

    can you do more than two numbers when doing th emax and min

  • rockyscarlet:

    System.out.println(“Bucky = best teacher ever”);

  • johney81:

    simply the best….keep the excellent job

  • surfzion:

    Thank you once again, your tutorials are the best, very clear and well clarified. A piece of advise if you let me: to avoid windows popping up all over, try to use more key combinations (Ctrl+S, Ctrl+C,Ctrl+V…) before running the programs, photocopying, pasting… Keep up the excellent work.

  • surfzion:

    Thank you once again, your tutorials are the best, very clear and well clarified. A piece of advise if you let me: to avoid windows popping up all over, try to use more key combinations (Ctrl+S, Ctrl+C,Ctrl+V…) before running the programs, photocopying, pasting… Keep up the excellent work.

  • geniustaha:

    awesome. thanks a lot

  • BravoScapeBcooperz:

    can i make games with this?, when i get excellent enough?

  • DontComplain:

    @DontComplain i mean when you floor -.3.4. and you get -4.

  • DontComplain:

    @flinkisme ??? i read what you said. but you do know that

    -4 < -3.4 < -3

    ceil rounds up and floor rounds down.

    what about it doesnt make sense to you?

    instead of a number that goes horizontal. the number line should be vertical where -4 is on the bottom and +4 is on top. now mark the top ceiling and mark the bottom floor.

    now 3.4 and it is floored. which means goes down. so which number shall it be?

  • flinkisme:

    @DontComplain

    Read my response very carefully. Reckon about number lines and absolute values.

    ___________________________________
    -4 -3.4 3 0 3 3.4 4

    When Math.ceil operates on a NEGATIVE number, say -3.4, the result is -3 (closer to zero). Math.floor moves a -3.4 to -4 (further from zero).

    You can’t always assume that you’ll be working with positive numbers. Especially if you are doing anything with coordinates.

  • thehcd:

    first post!

  • flinkisme:

    It might be better to describe Math.ceil and Math.floor as always increasing the absolute value or always decreasing the absolute value. When plugging in negative numbers, ceil moves the absolute value higher, which is closer to Zero, while floor moves the absolute value further away from Zero.

  • jessepoo4ya:

    would anyone know why the math class is not working?

    Anytime I try to run a program, it says “symbol not found”

    “Math.abs”
    it says that it cannot be found

  • jessepoo4ya:

    would anyone know why the math class is not working?

    Anytime I try to run a program, it says “symbol not found”

    “Math.abs”
    it says that it cannot be found

  • Kulexy:

    fantastic video! It clarifies me java a lot!

  • Thaileang:

    the best explaner

  • jrmovies1234321:

    Fail!

  • erashish14:

    Thanks, Gr8 Tutorial

  • javassii:

    Declaration Class must start with an UpperCase , and you forgot the public, private, or protected access..
    public class Appels..{}! It’s importante!! java class with Uppercase, and variable class with lowercase..!

  • hmk25061984:

    this mean java knows math )

  • MrCoolUS:

    @TutsAndTips, Java is most commonly used to make web apps, as it runs on the JVM, which can be uploaded to the internet via a .Jar file, and can be read in your internet browser. It is commonly used for online applications and programs. If you want to make anti virus, I suggest you stick with C++ as it is very efficient and is the industrial standard. Hope it helps

  • Fusionicon:

    forgot Math.random();

Leave a Reply