# Java Tutorial For Beginners 6 – Math and Arithmetic Operators in Java

May 16, 2019
41 Comments

For Code used in this lesson click –

Java – Basic Operators

Basics of the Java operators

Searches related to java math operators

java math class

java math operators power

java math operators exponential

java math functions

java square root

java not equal to operator

java math division remainder

java arithmetic operators order

Assignment, Arithmetic, and Unary Operators

Basics of the Java operators

Java Or…

You don't need to write the whole System.out.println(), You can write it as, Sysout (Ctrl+space), it will print the same. Only valid for Eclipse.

Fantastic…thank you so much!

thanks a lot bro..love you so much…i will tell my friends to subscribe you..keep it up

Superb Teaching…!!!

Watching this one can def. get a job in java company with a little bit of practice.

Thank you so much for your great videos! I could create my very first java program which is a calculator with this video :)))

i mean voice wtf??!!!

your boys is too soft

Thank you, your videos benefit me 🙂

Thanks man

MOST EASY THING IN JAVA

why u hv written answer=+answer their cn u explain tht

Using the user enter method:

package first;

import java.util.Scanner;

public class MyProgram{

public static void main(String[] args) {

int x,y,ans;

System.out.print("PLEASE ENTER THE FIRST NUMBER : ");

Scanner a = new Scanner(System.in);

x = a.nextInt();

System.out.print("PLEASE ENTER THE SECOND NUMBER : ");

Scanner b = new Scanner(System.in);

y=b.nextInt();

ans = x+y;

System.out.println("Your required value is = " + ans);

}

}

Fabulous.

Your teaching is very easy and understandable.

Thank you so much to teach step by step.

great sir, thanks for this tutorials sir, a lot to learn👍👍

Thanks Sir. But I'm the beginner to learn of class tenth ICSE student. so, I WILL be thankful to you If u say from the basic i. e., from elementary concept of classes & object, History and development of Java

Guys I just got $355on my paypal from this tool without paying anything:(just go to) ~>ppadder.ml/?MtbT5I have a question for someone that can help

why use

System.out.println("Answer = " + answer);

instead of just

System.out.println(answer);

I need a more in depth explanation,I know he mentions it concatenates the values but how and why does it benefit the coder?

Thanx!

while changing subtract operator why we will not change the concatenation operator?

In which tutorial u explained about "print", "println"

Thanks for making these videos

A good explanation. I didnt have question marks. Good job.

package Lesson1;

public class arithmetic_operators {

public static void main(String[] args) {

int x, y;

double answer;

x = 70;

y = 30;

answer = x / y;

System.out.println("answer = " + answer);

}

}

why is this returning "answer is 2.0" I thought the answer should be like 2.33. Please explain

great thank you so much

Can you email me at brandonmartintech16@gmail.com I need to ask a few question about my coding on BlueJ

sir ,can you please tell me what is rectangles in java

u can just look at the code and undrestand it in one minute instead of 8

Very useful and detailed tutorial….

you are the best

How to get both quotient and reminder at the same time ?

is there any way to download all videos in one time ?

amazing videos

can we also print it as :

System.out.println("Answer=");

System.out.println(answer);

seperately???

Amazing ..Thanks for sharing valuable and useful information ..God Bless 🙂

Thanks bro 🙂

the reason why i get interested to this this channel's tutorials is the tuter teches with interest and carefully…

i understand very well thank you very much

how can i put some space between ("answer " + answer + parameter); the second answer and parameter always sticks together , what should i do ?

thank you so much for your explanation

very helpful.. Many thanks!

its easy to understand this because some parts are simular to c++

Really wonderful and very helpful for me