Still we are watching your lectures sir instead of modern ones even after six years, it shows your intelligence and teaching techniques which is unique all over the Asia. Tks Sir G
Sir I would like to thank you as I am a Civil Engineer & didn't have any ideas about C programming n all these stuffs. But after watching ur videos it has motivated me tremendously and I learnt C programming & Data Structure from ur channel n now slowly n gradually trying to learn java also. The reason behind watching ur videos was I was trying to get placed in a mnc. But for a Civil engineering student who has studied Civil for 6 yrs including Diploma its almost next to impossible! After I have done my registration the exam date was 1mnth away only n still I didn't know a single thing about programming! But when I started listening ur lectures days passed nights passed I kept listening ur lectures n its bcz of u that I got d job in TCS through Off campus..Its been a unbelievable journey for me! Bcz I knew nothing! But ur lectures gave me that solidity n that motivation .. Dnt knw how I should thank u for giving a start of my carrier.. But its for sure that I will always remember u for being a massive passive contributor☺☺
Hello guyz... i also want to join IT sector ...m a commerce graduate & nowadays m trying to learn programming.... So, plz anyone can tell me that how many programming languages or how much knowledge is required to get me a job ???
sir ap jysa sir kor ho hi ni sakta h ap jo v samjhate h sidha sidha samjh me ata h or jb ni ata to 2-3 br video dekhne ke bd aa hi jata h log u sir apne bhot help keya h mera mai bs apka hi video dekhta hu tuition krta hu but samjhne apke ps video me ata hu thaku so much sir and keep your help us
Wow.....What a gr8 explanation ! Sir really ....Hats off....Sir...👌👌👌बहोत बढ़िया समजा रहे हो sir..... ये सीरीज आने वाली नई पीढ़ी को भी java सीखा देगा । admob से link जरूर करना sir । अच्छा रेवेन्यू मिल सकता है । हिंदी में बहोत लोगोने java सिखाया है लेकिन बहोत काम लोग्ने इतना detail में सिखाया है । sir plz kotlin सीरीज भी इसी तरह basic से advanced तक शरू करो । अभी तक किसी ने हिंदी में इतना detail में शरुआत तक नही की है । 👍👍👍👍👍👍😊☺
dear sir , please tell me can only prefer your video learn java perfectly or require some book if book require then tell to me which book is best for java.Thank you
We can have static: 1. member variables 2. member function 3. inner class Static local variables is not allowed as static is meant to be of the class and local variables are limited to the scope of method. Static outer class is not allowed as outer class is implicitly static and we use them to call static inner class, static member variable or static member function. static member function can only access static member variables. static inner classes can only access static member variables and methods.
Hi Sir, As you describe why we use static variable to store a value which can be used all over the code... like that why we use static class and what if we do not declare as static to inner class or if we do not declare static to the string in static inner class
Sir and comment readers plz reply I didn't get why static methods can't access instance variables and method I think they can be accessed and we access them too by creating Object in main(main is also static) method
Sir you said that variables that declared inside the method are called local variable then main is also a function then the variable that are declared inside the main fun are instance varible or local variable what what is the scope of that variables
Sir it is compulsory to access the static methods and variables with the help of class name ? can we access the static variables and functions with the help of object or not ? If not then why ?
Sir can we write static variables inside instance member function ?? When we make class as static then it is compulsory to make every variables & functions as static which is inside static class ??
Sirji I have few questions... kya ek se zyada main method ek file me ho sakte hain? Hum main method kahi bhi bana sakte hain? ya firstly main method banana padta hai? Last, jab hum ek package me same class name use karke 2 file banaenge to compiler ko kese pata hoga ki konsa code run karna hai?
sir according to oracle website their is no such thing as static inner class they call it static nested class. the inner class according to them is non static so i am confused plz clear this
Sir can you tell me that in static class there should only static member variable and function or we can write instance member variable and function also?
Sir your lectures are nice but your way of teaching is also awesome but I want to know is it necessary to have knowledge of C/C++ for java? I am unaware of those languages but able to get this and run this.
Classname._____ Ke badd hamesha static variable/static member function / static class hi aata h .So syntax for accessing instance variable of a class.please tell
Sir ur explanation style is too good its much helpful for me but in this video I have a doubt that is In Java, a static method can only call other static methods. Now as we know main() is a static method, so how it can call non-static method?
System is a class in the java.lang package. out is a static member of the System class, and is an instance of java.io.PrintStream . println is a method of java.io.PrintStream . This method is overloaded to print message to output destination, which is typically a console or file.
sir.. i have a doubt please help... as you said about static variable. Example.y=5; now which "object" of this class contains this "y" as it's static variable ??
Suppose there is a class called pets.And we have "objects" like cat and dogs etc. public class pets { String soud; static String owner; static number_of_legs; } //Now we are going to create 2 objects dogs and cats public static void main(String[ ] args) { pets cat=new pets( ); pets dog=new pets( ); cat.sound="meow"; dog.sound="bobo"; cat.owner="Ram"; dog.owner="Rohan"; pets.number_of_legs=4; //Now lets output it System.out.println(cat.sound); System.out.println(cat.number_of_legs); System.out.println(cat.owner); System.out.println(dog.sound); System.out.println(dog.number_of_legs); System.out.println(dog.owner); System.out.println("Number of legs of pets"+pets.number_of_legs); } The output is going to be meow 4 Ram bobo 4 Ram Number of legs of pets:4 In this example we keep sound as the variable here since we know that each object has a different sound.But in the case of the number of legs&the owner, we know that it is going to be a constant and since we don't want to change the value for different objects so we make the variable static. Since this variable is constant for every object ,we will only need one copy of it to avoid memory wastage.Like when we create the objects dog and cats ,there will be 2 variables of sound created(cat and dogs having different sounds) but only one variable for the owner (because its a constant). So the next time we want to declare another object of class type pets,this object will share the same owner as the other objects(cat and dogs). Since there is only 1 copy created,it is shared by all the objects.This means that I can access it by dog.owner or cat.owner or pets.owner(this is because all the object of pets will have this static variable so I can use this method to pre-define this variable) Once you initialize a static variable with a value ,java does not allow you to change the value(hence the name static).So it will remain constant throughout the program.
Still we are watching your lectures sir instead of modern ones even after six years, it shows your intelligence and teaching techniques which is unique all over the Asia. Tks Sir G
This is soo true!
So true yrrr
very true
👍🏻
Sir I would like to thank you as I am a Civil Engineer & didn't have any ideas about C programming n all these stuffs. But after watching ur videos it has motivated me tremendously and I learnt C programming & Data Structure from ur channel n now slowly n gradually trying to learn java also. The reason behind watching ur videos was I was trying to get placed in a mnc. But for a Civil engineering student who has studied Civil for 6 yrs including Diploma its almost next to impossible! After I have done my registration the exam date was 1mnth away only n still I didn't know a single thing about programming! But when I started listening ur lectures days passed nights passed I kept listening ur lectures n its bcz of u that I got d job in TCS through Off campus..Its been a unbelievable journey for me! Bcz I knew nothing! But ur lectures gave me that solidity n that motivation .. Dnt knw how I should thank u for giving a start of my carrier.. But its for sure that I will always remember u for being a massive passive contributor☺☺
same to me bro as you done but i am mechanical
i got TCS through off campus
❤️
Hello guyz... i also want to join IT sector ...m a commerce graduate & nowadays m trying to learn programming....
So, plz anyone can tell me that how many programming languages or how much knowledge is required to get me a job ???
Your salary in tcs?
@@ankitSingh-tu5on 3.36lpa
That last example of the account type class... Woah that was soo clearing . Thankyou sir!
its been 6 Years you uploaded still there's no video explaining things like you do . Again Thanks !
i tried to learn java many times but could not , but when i started watching your vedios then it became interesting for me.thanxx sir
the best thing i like about ur teaching u give real life application and example which make easy to understand the concept
sir, i never seen any teacher just like you. awesome sir,
sir, i am requesting you to please upload videos for project development step by step
Vintage course sir 😃 even now a days i take help from your great lectures...
Sir you explained it in best way through program.Loved the video.Keep going 👍🏻
sir your teaching method is very good.☺☺
thanks a lot sir...you've cleared tons of doubts of mine, following ur videos from c to java
Nicely explained about the static concept in JAVA.
Amazing lecture sir my all doubt about static keyword cleared 🤩
Best explanation i have seen so far.
your all videos are great and easy to understand thanks for your videos...
with out knowing this class perfectly it diffcult to learn further classes
Very informative wonderful lecture with simple explanation.Thank you.
sir ji that was a great work
I use to visit your channel
I found it useful
//thanks for such a great work
sir ap jysa sir kor ho hi ni sakta h ap jo v samjhate h sidha sidha samjh me ata h or jb ni ata to 2-3 br video dekhne ke bd aa hi jata h log u sir apne bhot help keya h mera mai bs apka hi video dekhta hu tuition krta hu but samjhne apke ps video me ata hu thaku so much sir and keep your help us
nice sir, new concepts to learn, thanks 👍
oo Deepak sir both sir are awesome
I have learnt Java OOPS concepts in your video. Smart Programming Channel is also very good, Keep uploading...
Wow.....What a gr8 explanation ! Sir really ....Hats off....Sir...👌👌👌बहोत बढ़िया समजा रहे हो sir..... ये सीरीज आने वाली नई पीढ़ी को भी java सीखा देगा । admob से link जरूर करना sir । अच्छा रेवेन्यू मिल सकता है । हिंदी में बहोत लोगोने java सिखाया है लेकिन बहोत काम लोग्ने इतना detail में सिखाया है । sir plz kotlin सीरीज भी इसी तरह basic से advanced तक शरू करो । अभी तक किसी ने हिंदी में इतना detail में शरुआत तक नही की है । 👍👍👍👍👍👍😊☺
Thank so much sir, such much programming language agar sikhni ho to aap se best koi nahi sikha sakta
Thank you sir...your explanation is awesome.... thanks one again sir👏👏👏
No one can beat ur content... Neither code wd harry nor physics wallah skills
Great sir thank you so much today I understand the proper functioning of static keyword😊
Sir mene is video ki kafi sari comments pathi ..
Agar aap program run karke batayenge to kafi dought ana bandh honge . ..
Best lecture for 2024❤
awesome sir, thanks for gave me a wonderful knowledge about java
its end of 2023 and I am still watching these lectures.... he is brilliant.
dear sir ,
please tell me can only prefer your video learn java perfectly or require some book if book require then tell to me which book is best for java.Thank you
aap aise hi video banaye bohot mahan kaam kar rahe hai aap
Thanks sir explanation is easy to understand.
You are the greatest tutor..May Allah bless you 🙏🏻🙏🏻
We can have static:
1. member variables
2. member function
3. inner class
Static local variables is not allowed as static is meant to be of the class and local variables are limited to the scope of method.
Static outer class is not allowed as outer class is implicitly static and we use them to call static inner class, static member variable or static member function.
static member function can only access static member variables.
static inner classes can only access static member variables and methods.
U r very good at teaching.
plz update vdeos on applets n graphics nd event handlng...thnx lot
Superb video it cleared my all doubts...
Awesome videos and teacher❣
Thanku so much sir es video me bohat sare doubt clear ho gye ❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️
Nice explanation sir.sir make a vidio about static Block
Hi Sir, As you describe why we use static variable to store a value which can be used all over the code... like that why we use static class and what if we do not declare as static to inner class or if we do not declare static to the string in static inner class
awesome tutorial for static concept....very informative..
Sir and comment readers plz reply
I didn't get why static methods can't access instance variables and method
I think they can be accessed and we access them too by creating
Object in main(main is also static) method
because static members can be called without creating any object so to avoid this problem they made this rule..
best lectures ever on java..
Sir you said that variables that declared inside the method are called local variable then main is also a function then the variable that are declared inside the main fun are instance varible or local variable what what is the scope of that variables
Really great teaching sir
Sir it is compulsory to access the static methods and variables with the help of class name ? can we access the static variables and functions with the help of object or not ? If not then why ?
Sir can we write static variables inside instance member function ??
When we make class as static then it is compulsory to make every variables & functions as static which is inside static class ??
Sirji I have few questions...
kya ek se zyada main method ek file me ho sakte hain?
Hum main method kahi bhi bana sakte hain? ya firstly main method banana padta hai?
Last, jab hum ek package me same class name use karke 2 file banaenge to compiler ko kese pata hoga ki konsa code run karna hai?
thanks for best video sir....plz also provide video on Html,V.B,Oracle
your lectures r very helpful.. keep it up.... sir
Bht helpful vedio h mazza aagyaa
If we make outer class then there is an error//can we make outer class static ?? If no then what is the need to make outer class static.
Sir then how to create second object in class if we want?
It was very helpful .
Thank you sir.
sir according to oracle website their is no such thing as static inner class they call it static nested class.
the inner class according to them is non static so i am confused plz clear this
Thank you sir...bahot achha samjhaya thanks
You are really good sir!!!👍
Sir please make a video on constant in java...how to declare constant in java...and diff between final and static final
during compilation of program that you discuss in this lecture, it shows error in static inner class method
Sir I'm confused becoz class instance variable can also call a static function without any error
bahut achhe sir. bahut achhe se samajh aaya
i didnt get it :'(
Great!!!
cleared all my doubts thank you sir
Sir why you not write a complete program with execution that will help to whole concept very clearly.
Amit Roy nice suggestion
Sir app development sikhaie ek dam basic level se step by step, point to point
god bless you sir..'
Very important question............kya inner class me static function hota hai?
why not...
lyk multithreaded programming , exception handling , JDBC etc..
Sir mene isi program me Example.y=5 kiya fir
System.out.println(y);
Kiya to
Output = null
Why ?
Sir, can we write the instance member in inner static class ????
I understand. Jinko smjh nhi aaya hai wo dobara iss video ko dekho
Sir please explain this lecture with the help of memory allocation block diagram, as you have done for other lecture of c/c++ lecture.
don't take this worng but you are learnning it till now mean you look senior.Is Java too wast ?
THANKS in advance :D
@@shahmirali6609 Sikhne ki koi umar nhi hoti!
Sir please recommende any book which tells similar info like you. It will be greatful to me.
Sir main is a static function and it can access an instance variable
Best teacher
Sir can you tell me that in static class there should only static member variable and function or we can write instance member variable and function also?
Static class contains only static members. Since the class cannot be instantiated no instance methods can be called or instance fields accessed.
Sir when I wrote this program compiler is showing error that class Example should be written in Example.java
Sir your lectures are nice but your way of teaching is also awesome but I want to know is it necessary to have knowledge of C/C++ for java? I am unaware of those languages but able to get this and run this.
nope ,you can start from scratch
Sir function ke andar static variable kyun ni le sakte hain??
Is a variable in a static function is static or not??
please update vdeos on applets n graphics nd event handlng
mashallah,thanku sir
Classname._____ Ke badd hamesha static variable/static member function / static class hi aata h .So syntax for accessing instance variable of a class.please tell
sir is it necessary to declare a static member variable if so why?
apne youtube channel pe share krunga ye video
Sir,
What will be the use of static class?
Sir, can you provide the pdf format of java to learn the java in an easier method.
Sir can I assign the value of static member in instance member function of same class?
Sir static class ma instance variables ko declare kar skty hy kia?
Sir after class completion we have not put a semicolon?? Because without semicolon I don't get output
in java we doesnt put semicolon after completion of class
MUKUL JAIN but without semicolon I don't get my output!!
Sir Abhi latest java padni chahiye yaa java 8.0 aaj bhi pad len to sufficient ha?
Sir static variables object banaake bhi access ho rha hai aur function bhi access ho rhe hain..
What does this mean??
sir you have said that we can make static inner class but what about static class can we make static classes if not why?
Sir ur explanation style is too good its much helpful for me but in this video I have a doubt that is
In Java, a static method can only call other static methods. Now as we know main() is a static method, so how it can call non-static method?
But we call those methods using the objects whereas static functions are called using Class name
sir, in System.out.println() , out is a reference variable having the reference of an object ...so how can out be a static member?
System is a class in the java.lang package. out is a static member of the System class, and is an instance of java.io.PrintStream . println is a method of java.io.PrintStream . This method is overloaded to print message to output destination, which is typically a console or file.
Mja agaya sir.......good work...
Oooosm siir bht ache se smj aaya
saurabh, good explanation thanks
give respect
sir.. i have a doubt please help...
as you said about static variable.
Example.y=5;
now which "object" of this class contains this "y" as it's static variable ??
Suppose there is a class called pets.And we have "objects" like cat and dogs etc.
public class pets
{
String soud;
static String owner;
static number_of_legs;
}
//Now we are going to create 2 objects dogs and cats
public static void main(String[ ] args)
{
pets cat=new pets( );
pets dog=new pets( );
cat.sound="meow";
dog.sound="bobo";
cat.owner="Ram";
dog.owner="Rohan";
pets.number_of_legs=4;
//Now lets output it
System.out.println(cat.sound);
System.out.println(cat.number_of_legs);
System.out.println(cat.owner);
System.out.println(dog.sound);
System.out.println(dog.number_of_legs);
System.out.println(dog.owner);
System.out.println("Number of legs of pets"+pets.number_of_legs);
}
The output is going to be
meow
4
Ram
bobo
4
Ram
Number of legs of pets:4
In this example we keep sound as the variable here since we know that each object has a different sound.But in the case of the number of legs&the owner, we know that it is going to be a constant and since we don't want to change the value for different objects so we make the variable static.
Since this variable is constant for every object ,we will only need one copy of it to avoid memory wastage.Like when we create the objects dog and cats ,there will be 2 variables of sound created(cat and dogs having different sounds) but only one variable for the owner (because its a constant).
So the next time we want to declare another object of class type pets,this object will share the same owner as the other objects(cat and dogs).
Since there is only 1 copy created,it is shared by all the objects.This means that I can access it by dog.owner
or cat.owner or pets.owner(this is because all the object of pets will have this static variable so I can use this method to pre-define this variable)
Once you initialize a static variable with a value ,java does not allow you to change the value(hence the name static).So it will remain constant throughout the program.
Noel Sebastian Thank you so much sir... It helped alot..