What! It's like u jump/skip too far from the last video lesson and too fast as well. I can understand bcoz I've learned c and c++ language before but a real beginner will confuse and cry
3:50 class HelloWorld { public static void main(String[] args) { char c = 'a'; c = c+1; System.out.println(c); } } Error: conversion from int to char c = c+1; ^ 1 error when I use c++ it works...
with help of chat gpt i found class HelloWorld { public static void main(String[] args) { char c = 'a'; c = (char)(c+3); System.out.println(c); } } This works...
First you'll have to understand it in terms of ASCII code(I think it's actually in Unicode, but idk how to explain in it, so I'll tell in ASCII) The ASCII of 'a' is 97 and 'b' is 98 When you do c++, it's like incrementing the ASCII code. first c= 97(in ASCII- I.E, a) C++: now it's c=98(in ASCII- I.E, b) So this is how char increament works. But c = c+1; Is like adding an Integer(1) to a character/string(a) In layman terms it's like Adding a Number to alphabet, Which is not possible.- hence an ERROR Well, I'm 3 months late, so I hope you'd already figured it out
Ur teaching style is awesome !!
very good class sir i could not able to understand programs but this class was awesome
Please make a series on creating a game engine with Java sir
What! It's like u jump/skip too far from the last video lesson and too fast as well. I can understand bcoz I've learned c and c++ language before but a real beginner will confuse and cry
I guess that’s why I’m confused
I am totally confused like where did all thise value came from
New Info --> 1:24
Bro Regular Expression in java ...
plz tell us about this topic..
Is literal is support for all datatypes or not
what is 12e10 here? I didnt understand it
it is like writing in the forn of 1.2x10^11 or 12x10^10
I don't know about java so much. But in cpp we use this as exponentiation and not epsilon. It's like 10e7 means 10 raised to the power of 7.
please take coding questions also
amazing teaching
Thank you so much sir
3:50
class HelloWorld {
public static void main(String[] args) {
char c = 'a';
c = c+1;
System.out.println(c);
}
}
Error: conversion from int to char
c = c+1;
^
1 error
when I use c++ it works...
with help of chat gpt i found
class HelloWorld {
public static void main(String[] args) {
char c = 'a';
c = (char)(c+3);
System.out.println(c);
}
}
This works...
First you'll have to understand it in terms of ASCII code(I think it's actually in Unicode, but idk how to explain in it, so I'll tell in ASCII)
The ASCII of 'a' is 97
and 'b' is 98
When you do c++, it's like incrementing the ASCII code.
first c= 97(in ASCII- I.E, a)
C++:
now it's c=98(in ASCII- I.E, b)
So this is how char increament works.
But c = c+1;
Is like adding an Integer(1) to a character/string(a)
In layman terms it's like Adding a Number to alphabet, Which is not possible.- hence an ERROR
Well, I'm 3 months late, so I hope you'd already figured it out
@@ashleshkanchan825Thanks bro sorry for late reply.
int c=1_00_00_000; //This is working
int cI=1_000_000_000_000; //This is not working
Why is so?
out of range for int
Place under score for 00 00 00 00 000
Sir please provide their notes.
Please sir
thank you