Lecture 7 Static Members in Java Hindi

Поделиться
HTML-код
  • Опубликовано: 15 сен 2024
  • Like, Comments, Share and SUBSCRIBE

Комментарии • 336

  • @ajmalbangash6928
    @ajmalbangash6928 3 года назад +70

    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

  • @Sexy10975
    @Sexy10975 4 года назад +57

    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☺☺

    • @beastgaming8501
      @beastgaming8501 4 года назад +3

      same to me bro as you done but i am mechanical
      i got TCS through off campus

    • @muhammadazeem5549
      @muhammadazeem5549 4 года назад +1

      ❤️

    • @happyhappy9084
      @happyhappy9084 4 года назад +4

      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 ???

    • @ankitSingh-tu5on
      @ankitSingh-tu5on 4 года назад

      Your salary in tcs?

    • @Sexy10975
      @Sexy10975 4 года назад

      @@ankitSingh-tu5on 3.36lpa

  • @Apurvsankhyadhar
    @Apurvsankhyadhar 6 лет назад +19

    That last example of the account type class... Woah that was soo clearing . Thankyou sir!

  • @mdimranhussain171
    @mdimranhussain171 3 года назад +2

    its been 6 Years you uploaded still there's no video explaining things like you do . Again Thanks !

  • @ankitatandon251
    @ankitatandon251 4 года назад +1

    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

  • @abhishekanand2991
    @abhishekanand2991 4 года назад +1

    the best thing i like about ur teaching u give real life application and example which make easy to understand the concept

  • @nitishchoudhary4396
    @nitishchoudhary4396 2 года назад +3

    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

  • @wrinfo9894
    @wrinfo9894 Год назад +2

    Vintage course sir 😃 even now a days i take help from your great lectures...

  • @vedanam5195
    @vedanam5195 3 года назад +1

    Sir you explained it in best way through program.Loved the video.Keep going 👍🏻

  • @Compinfo-q5c
    @Compinfo-q5c 7 лет назад +2

    sir your teaching method is very good.☺☺

  • @RutwikPatel246
    @RutwikPatel246 6 лет назад +2

    thanks a lot sir...you've cleared tons of doubts of mine, following ur videos from c to java

  • @indianyoutuberpew932
    @indianyoutuberpew932 6 лет назад +6

    Nicely explained about the static concept in JAVA.

  • @shivanipatidar1902
    @shivanipatidar1902 9 месяцев назад +1

    Amazing lecture sir my all doubt about static keyword cleared 🤩

  • @himanshushekhar9501
    @himanshushekhar9501 3 года назад +1

    Best explanation i have seen so far.

  • @chiragparmar3071
    @chiragparmar3071 8 лет назад +1

    your all videos are great and easy to understand thanks for your videos...

  • @beastgaming8501
    @beastgaming8501 4 года назад +2

    with out knowing this class perfectly it diffcult to learn further classes

  • @lizapandey167
    @lizapandey167 6 лет назад +1

    Very informative wonderful lecture with simple explanation.Thank you.

  • @webseries9129
    @webseries9129 7 лет назад +1

    sir ji that was a great work
    I use to visit your channel
    I found it useful
    //thanks for such a great work

  • @aaryanayan2848
    @aaryanayan2848 3 года назад

    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

  • @SmartProgramming
    @SmartProgramming 6 лет назад +9

    nice sir, new concepts to learn, thanks 👍

    • @mahendrashah9810
      @mahendrashah9810 3 года назад +1

      oo Deepak sir both sir are awesome

    • @cs_soldier5292
      @cs_soldier5292 3 года назад

      I have learnt Java OOPS concepts in your video. Smart Programming Channel is also very good, Keep uploading...

  • @JK92007
    @JK92007 6 лет назад

    Wow.....What a gr8 explanation ! Sir really ....Hats off....Sir...👌👌👌बहोत बढ़िया समजा रहे हो sir..... ये सीरीज आने वाली नई पीढ़ी को भी java सीखा देगा । admob से link जरूर करना sir । अच्छा रेवेन्यू मिल सकता है । हिंदी में बहोत लोगोने java सिखाया है लेकिन बहोत काम लोग्ने इतना detail में सिखाया है । sir plz kotlin सीरीज भी इसी तरह basic से advanced तक शरू करो । अभी तक किसी ने हिंदी में इतना detail में शरुआत तक नही की है । 👍👍👍👍👍👍😊☺

  • @lakhdeepsingh5883
    @lakhdeepsingh5883 7 лет назад

    Thank so much sir, such much programming language agar sikhni ho to aap se best koi nahi sikha sakta

  • @ayushkssk
    @ayushkssk 4 года назад +1

    Thank you sir...your explanation is awesome.... thanks one again sir👏👏👏

  • @NileshArt916
    @NileshArt916 Год назад

    No one can beat ur content... Neither code wd harry nor physics wallah skills

  • @supreetsingh1368
    @supreetsingh1368 7 лет назад +1

    Great sir thank you so much today I understand the proper functioning of static keyword😊

  • @krunalkp1032
    @krunalkp1032 7 лет назад +30

    Sir mene is video ki kafi sari comments pathi ..
    Agar aap program run karke batayenge to kafi dought ana bandh honge . ..

  • @febshort6791
    @febshort6791 7 месяцев назад +2

    Best lecture for 2024❤

  • @ravinderkaur4696
    @ravinderkaur4696 8 лет назад +1

    awesome sir, thanks for gave me a wonderful knowledge about java

  • @PrashantSaini76
    @PrashantSaini76 10 месяцев назад

    its end of 2023 and I am still watching these lectures.... he is brilliant.

  • @miscellaneoustalk11
    @miscellaneoustalk11 7 лет назад +3

    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

  • @viharbhatt9793
    @viharbhatt9793 3 года назад

    aap aise hi video banaye bohot mahan kaam kar rahe hai aap

  • @shaifaliagarwal1749
    @shaifaliagarwal1749 3 года назад

    Thanks sir explanation is easy to understand.

  • @786shefi
    @786shefi 2 года назад +1

    You are the greatest tutor..May Allah bless you 🙏🏻🙏🏻

  • @anupamr437
    @anupamr437 16 дней назад

    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.

  • @abhishekkalita93
    @abhishekkalita93 4 года назад

    U r very good at teaching.

  • @chanchal2112
    @chanchal2112 8 лет назад +6

    plz update vdeos on applets n graphics nd event handlng...thnx lot

  • @rashmiranjannayak8965
    @rashmiranjannayak8965 6 лет назад

    Superb video it cleared my all doubts...

  • @Hheshipoohbccdruiojbdssdgvbb
    @Hheshipoohbccdruiojbdssdgvbb Год назад

    Awesome videos and teacher❣

  • @sanjeevkumar-ig7zq
    @sanjeevkumar-ig7zq 4 года назад

    Thanku so much sir es video me bohat sare doubt clear ho gye ❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️

  • @wahidurrahman80
    @wahidurrahman80 3 года назад

    Nice explanation sir.sir make a vidio about static Block

  • @aloksahoo7852
    @aloksahoo7852 7 лет назад

    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

  • @prashantpandey5637
    @prashantpandey5637 9 лет назад +3

    awesome tutorial for static concept....very informative..

  • @akhileshyadav9862
    @akhileshyadav9862 4 года назад +1

    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

    • @maheshsirsat1811
      @maheshsirsat1811 4 года назад

      because static members can be called without creating any object so to avoid this problem they made this rule..

  • @kiranpatil-yz3tq
    @kiranpatil-yz3tq 7 лет назад

    best lectures ever on java..

  • @namratadhore6331
    @namratadhore6331 3 года назад

    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

  • @sonaligayake9240
    @sonaligayake9240 Год назад

    Really great teaching sir

  • @kanwaljeetsingh5503
    @kanwaljeetsingh5503 7 лет назад +1

    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 ?

  • @MamtaSingh-vc8rb
    @MamtaSingh-vc8rb 2 года назад

    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 ??

  • @ershaan
    @ershaan 7 лет назад

    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?

  • @3kknowledge715
    @3kknowledge715 7 лет назад

    thanks for best video sir....plz also provide video on Html,V.B,Oracle

  • @idill7451
    @idill7451 7 лет назад

    your lectures r very helpful.. keep it up.... sir

  • @shubhshree5419
    @shubhshree5419 5 лет назад

    Bht helpful vedio h mazza aagyaa

  • @pratikshachauhan4152
    @pratikshachauhan4152 6 лет назад

    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.

  • @ebrahimmorkas3877
    @ebrahimmorkas3877 4 года назад +1

    Sir then how to create second object in class if we want?

  • @ManzoorHussain-gz1vk
    @ManzoorHussain-gz1vk 5 лет назад

    It was very helpful .
    Thank you sir.

  • @abdulmoizahmer9770
    @abdulmoizahmer9770 8 лет назад

    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

  • @motivationalthoughts4u
    @motivationalthoughts4u 5 лет назад

    Thank you sir...bahot achha samjhaya thanks

  • @techrobby6400
    @techrobby6400 6 лет назад

    You are really good sir!!!👍

  • @s__1710
    @s__1710 4 года назад

    Sir please make a video on constant in java...how to declare constant in java...and diff between final and static final

  • @nanuaggarwal3840
    @nanuaggarwal3840 7 лет назад

    during compilation of program that you discuss in this lecture, it shows error in static inner class method

  • @parvinsuthar5544
    @parvinsuthar5544 6 лет назад

    Sir I'm confused becoz class instance variable can also call a static function without any error

  • @somethingnew3167
    @somethingnew3167 8 лет назад +1

    bahut achhe sir. bahut achhe se samajh aaya

  • @anushapoddar7801
    @anushapoddar7801 7 лет назад +2

    Great!!!

  • @rajumodi2536
    @rajumodi2536 2 года назад

    cleared all my doubts thank you sir

  • @amitroy_kolkata
    @amitroy_kolkata 7 лет назад +1

    Sir why you not write a complete program with execution that will help to whole concept very clearly.

  • @techboydharm6580
    @techboydharm6580 4 года назад

    Sir app development sikhaie ek dam basic level se step by step, point to point

  • @knowledgeondemand3594
    @knowledgeondemand3594 Месяц назад

    god bless you sir..'

  • @Advocate_Parikh
    @Advocate_Parikh 7 лет назад

    Very important question............kya inner class me static function hota hai?

  • @niteshmishra4122
    @niteshmishra4122 9 лет назад +1

    lyk multithreaded programming , exception handling , JDBC etc..

  • @krunalkp1032
    @krunalkp1032 7 лет назад

    Sir mene isi program me Example.y=5 kiya fir
    System.out.println(y);
    Kiya to
    Output = null
    Why ?

  • @shalinikatore1161
    @shalinikatore1161 2 года назад

    Sir, can we write the instance member in inner static class ????

  • @azharmehmood7768
    @azharmehmood7768 4 года назад +1

    I understand. Jinko smjh nhi aaya hai wo dobara iss video ko dekho

  • @ashutoshmukherjee5346
    @ashutoshmukherjee5346 7 лет назад +7

    Sir please explain this lecture with the help of memory allocation block diagram, as you have done for other lecture of c/c++ lecture.

    • @shahmirali6609
      @shahmirali6609 5 лет назад

      don't take this worng but you are learnning it till now mean you look senior.Is Java too wast ?
      THANKS in advance :D

    • @mohitverma2072
      @mohitverma2072 4 года назад

      @@shahmirali6609 Sikhne ki koi umar nhi hoti!

  • @surajpaswan7456
    @surajpaswan7456 Год назад

    Sir please recommende any book which tells similar info like you. It will be greatful to me.

  • @saumyasingh2697
    @saumyasingh2697 5 лет назад

    Sir main is a static function and it can access an instance variable

  • @akshaydhote7151
    @akshaydhote7151 3 года назад

    Best teacher

  • @pallavijangir7234
    @pallavijangir7234 7 лет назад

    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?

    • @nanuaggarwal3840
      @nanuaggarwal3840 7 лет назад

      Static class contains only static members. Since the class cannot be instantiated no instance methods can be called or instance fields accessed.

  • @pranoymukherjee2575
    @pranoymukherjee2575 6 лет назад

    Sir when I wrote this program compiler is showing error that class Example should be written in Example.java

  • @DevoteePooja
    @DevoteePooja 6 лет назад

    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.

  • @BitProgramming
    @BitProgramming 3 года назад

    Sir function ke andar static variable kyun ni le sakte hain??

  • @eloramohanty132
    @eloramohanty132 4 года назад

    Is a variable in a static function is static or not??

  • @yeshmusicjapla
    @yeshmusicjapla 4 года назад

    please update vdeos on applets n graphics nd event handlng

  • @musakhan5927
    @musakhan5927 8 лет назад +1

    mashallah,thanku sir

  • @AkashSingh-pw5ip
    @AkashSingh-pw5ip 6 лет назад

    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

  • @swatitripathi7724
    @swatitripathi7724 7 лет назад

    sir is it necessary to declare a static member variable if so why?

  • @yogeshyts
    @yogeshyts 5 лет назад

    apne youtube channel pe share krunga ye video

  • @ravishankarbaranwal6917
    @ravishankarbaranwal6917 6 лет назад +1

    Sir,
    What will be the use of static class?

  • @SahilSingh-fq9io
    @SahilSingh-fq9io 4 года назад +2

    Sir, can you provide the pdf format of java to learn the java in an easier method.

  • @ujjawalkapoor8342
    @ujjawalkapoor8342 4 года назад

    Sir can I assign the value of static member in instance member function of same class?

  • @nothingbutsomething10
    @nothingbutsomething10 4 года назад

    Sir static class ma instance variables ko declare kar skty hy kia?

  • @amithakar2682
    @amithakar2682 6 лет назад

    Sir after class completion we have not put a semicolon?? Because without​ semicolon I don't get output

    • @mukuljain4087
      @mukuljain4087 6 лет назад

      in java we doesnt put semicolon after completion of class

    • @amithakar2682
      @amithakar2682 6 лет назад

      MUKUL JAIN but without semicolon I don't get my output!!

  • @abhaysharma4759
    @abhaysharma4759 4 года назад

    Sir Abhi latest java padni chahiye yaa java 8.0 aaj bhi pad len to sufficient ha?

  • @maths_kamlesh1787
    @maths_kamlesh1787 6 лет назад

    Sir static variables object banaake bhi access ho rha hai aur function bhi access ho rhe hain..
    What does this mean??

  • @priyankagiri519
    @priyankagiri519 7 лет назад

    sir you have said that we can make static inner class but what about static class can we make static classes if not why?

  • @bhartisharma7731
    @bhartisharma7731 7 лет назад

    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?

    • @jeetganatra7977
      @jeetganatra7977 6 лет назад

      But we call those methods using the objects whereas static functions are called using Class name

  • @rohit-vm6cc
    @rohit-vm6cc 8 лет назад

    sir, in System.out.println() , out is a reference variable having the reference of an object ...so how can out be a static member?

    • @SaurabhSingh-kz5jv
      @SaurabhSingh-kz5jv 7 лет назад

      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.

  • @raghavchauhan8598
    @raghavchauhan8598 6 лет назад

    Mja agaya sir.......good work...

  • @amitmalik5196
    @amitmalik5196 8 лет назад

    Oooosm siir bht ache se smj aaya

  • @javafrm
    @javafrm 7 лет назад

    saurabh, good explanation thanks

  • @rajatgarg4786
    @rajatgarg4786 6 лет назад

    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 ??

    • @noelsebastian8760
      @noelsebastian8760 6 лет назад +2

      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.

    • @rajatgarg4786
      @rajatgarg4786 6 лет назад

      Noel Sebastian Thank you so much sir... It helped alot..