Really sir you are great I complete 1 to 10 lecture in one day without any doubt thank you so much sir 🥺🙏
@kirubasathish3683
Жыл бұрын
sir so num1 = num1 + 2; and num1 += 2; is the same thing?
@The_Motobikers_World
Жыл бұрын
Yes, num1 +=2 internally works as num1=num1+2
@ISHADUA-l6r
8 ай бұрын
Why video name is Assignment Operator in Java? it should be Arithmatic Operators in Java
@yitingchen8278
Жыл бұрын
note: when trying to assign a value or fetch a value, post-increment will behavior differently from pre-increment.
@yashjangid4222
3 ай бұрын
sir please dont say star say Asterisk so the students can get a new work thank you sir
@alfredndlovu356
5 ай бұрын
Was the title of this video not meant to be "Arithmetic Operators in Java" ?
@nirongajanayake2515
Жыл бұрын
Sir, I am really grateful for your teachings ❤️❤️
@durgaraoponnuru17
Жыл бұрын
When we do num1++ or some other operations, values are being changed in output. Again when we perform another operation, its being performed on default number, instead of updated value. Can anyone explain this. For eg: num1=7; when num1++ is performed, value changed to 8, Again when another operation say num1 +=1; is performed value still showing 8 instead of 9.
@MrPradeepchandu
Жыл бұрын
Because you are giving num1=7 at start of code everytime you run
@SanjanaGupta279
10 ай бұрын
See There is two option first is to use looping statement(For loop, while loop) For Example: class HelloWorld { public static void main (String[] args) { int num1=1; while(num1
@BLAZIN77KONG
11 ай бұрын
best tutorial ever
@sandunjayasekara131
Жыл бұрын
Best series for learning java, Thank you sir
@mango-strawberry
Жыл бұрын
9:56
@nishalsreekanta7802
9 ай бұрын
4:18 the output must have been 7 right? Because num1 is assigned with 9 after increment? 9 - 2 = 7. But how was the output 5 and even in multiplication it took 7 * 8 and not 5 * 8. Can someone explain this ?
@barathkraja5681
8 ай бұрын
It was commented out with double slash after it was made to 9. So now num 1 will be with its original value and will remain as 7. Now when num1 -= 2 is coded, it will result in output as 5. The same goes with multiplication since now original value of num1 remains 7 and when the line num1 *=8 it's num 1= num1(which is 7) *8 = 56
@abhijaiallgamesgamer2075
Жыл бұрын
i just realized u were using macOS
@sm07
Жыл бұрын
What is the difference Between public static void main(String a[])
@quickkcare605
Жыл бұрын
Just a name difference, just like you can give variable any name
@whytimes863
Жыл бұрын
No difference, bro. You can put any name there a[], args[], sampath[], anything.
@sm07
Жыл бұрын
Thanks guys
@priyanshsrivastava3443
Ай бұрын
no difference both are name suppose u use args than u can use a in any other operation which will make it easy to understand
@Ilamaran-n9f
2 ай бұрын
// for what purpose he was using this !!!
@Ilamaran-n9f
2 ай бұрын
in the literal series also he didn't explain about it😔
@kundhanrockzstudio916
Ай бұрын
Coz to ignore the title he used before , just the way rest all ignore ur comment dumbo
@IAmSharadhNaidu
Ай бұрын
@@Ilamaran-n9fit's called a command which is used to ignore that line which basically means the compiler ignores that line from compiling we can use it by ctrl+l in vscode
@Ilamaran-n9f
Ай бұрын
@@IAmSharadhNaidu thx bro
@vkyfox
Жыл бұрын
yovvvvv this is arithmetic operator yarrrrr
@emhoang252
9 ай бұрын
thank you
@Manisha_1490
11 ай бұрын
Tq sir😊😊
@challacharan1648
Жыл бұрын
very much help ful
@tharinduhasarangarubasinsi7714
Жыл бұрын
Sir you did really great :)
@vivekvardhan6491
Жыл бұрын
when you increment the value it should print 8 but why it is printing 7.
@hari3245
Жыл бұрын
Bcz we insert is this to system. Out. Println() ; // we insert than number it is perform value & condition & Inc/dec Ex: For(int vivek =1;vivek
@vivekvardhan6491
Жыл бұрын
@@hari3245 So 1st the given value is going to print and then it will perform other condition right.
@hari3245
Жыл бұрын
@@vivekvardhan6491 yeah..
@Naveen_kumar14
Жыл бұрын
Why he used double // slash can anyone explain me
@shazam8095
3 ай бұрын
it is used to make that line a comment which will be ignored by java while running
@amitavaghosh7201
Жыл бұрын
Too much videos uploaded at the same time
@nandakishore8447
11 ай бұрын
public class confus { public static void main (String args[]) { int num = 7; int a = ++num; int b = num++; System.out.println(a); System.out.println(b); } } this program getting output as 8 8 instead 8 7 any explanation please
@ckubri5061
11 ай бұрын
bro im not sure wt u r asking but, the post n pre increment does the same job but differently...like said in the video. ++num n num++ will give the same output for 7. As we know if we give our intial value e.g num=9, we get 10 either if we give ++num or num++ but ur class name😹
@barathkraja5681
8 ай бұрын
So the reason why b is giving result as 8 is when a= ++num is executed value of num changes to 8 and so b fetches the last updated value of num which is 8 and prints it and then increments it to 9. Now when a=++num is executed a will be printed as 10 and b as 10 and then a as 11 and b as 11 and so on. Basically value of num changes even though you assign that to a separate variable like a or b.
Пікірлер: 52