4.3 Short Hand Operators in Java | With Java Tricks | Tutorial

preview_player
Показать описание
A shorthand operator is a shorter way to express something that is already available in the Java programming language Short hand operator used for increment or decrement.Like i+=2 which means i=i+2. Similary i-=2 which means i=i-2 similary for i*=2 means i=i*2.

Follow on Facebook:

Subscribe to our other channel:
Telusko Hindi :

Subscribe to the channel and learn Programming in easy way.

Рекомендации по теме
Комментарии
Автор

In 2:56
b = (byte) b * 2.5; you said this is error. Its error because you forget 2 bracket.
b = (byte) (b * 2.5); this is write

lamboblaze
Автор

thanks for this tutorial sir, easy to understand 👍👍

SmartProgramming
Автор

byte a = 8;
a = (byte) (a*2.5);
System.out.println(a);

Atishayd
Автор

the voice is too low and i barley catch what you said

dawitdereje
Автор

What happened to byte in this case, why didn't it work same?

deep
Автор

based on your logic the answer to the below program should be 25 but the answer is

public class test{
psvm(String args[]){
Sys.out.printf("why is this double : %f ", 5 * 5.0)
}
}

Anirudh_K
Автор

it's very disappointed there is not even one reply from you sir.

abhikpatra
Автор

if we do caste whole thing to byte it gives same answer as 20. we can do type casting and also short hand operator, these two way to do same thing .

gopikrishnanp
Автор

What is the format specifier in case of byte like for int we have %d and for double we have %f

AbhishekSingh-lgdr
Автор

How 20 will be come output please explain

balatrendzz
Автор

if you write like this its works
btye i=9;
i=(byte) (i+8.0);

ajaypratapsingh
Автор

Actually, I couldn't get it. Why b *= 2.5 is not equal to b = b * 2.5

balakowsalya
Автор

Sir nothing understand from this video 😐😐😌

satyam
Автор

what does this mean
x =5
x &= 3


output = 1

sujay.b
Автор

Telusko, your app doesn't work!!!

ivanpantic
Автор

based on your logic the answer to the below program should be 25 but the answer is

public class test{
psvm(String args[]){
Sys.out.printf("why is this double : %f ", 5 * 5.0)
}
}

Anirudh_K
welcome to shbcf.ru