Java Crash course | 07 | Java STATIC Keyword Explained | Tamil | Java for Automation

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ต.ค. 2024

ความคิดเห็น • 31

  • @rehanabraham2135
    @rehanabraham2135 ปีที่แล้ว

    really you are great bro crystal clear explanation even in coaching centers they wont say it that clear awesome!!

  • @yaserarafath6581
    @yaserarafath6581 ปีที่แล้ว

    Your teaching way like a r&d way of teaching ❤❤❤

  • @nellainayagam7540
    @nellainayagam7540 2 ปีที่แล้ว +3

    proud to be ur student

  • @venkatesh273
    @venkatesh273 4 ปีที่แล้ว +1

    Great content. i thought i was clear about static. but this shed more light on the concept.

  • @kavitharamamoorthy4538
    @kavitharamamoorthy4538 ปีที่แล้ว +1

    u are good teacher

  • @RajKumar-qj3vc
    @RajKumar-qj3vc ปีที่แล้ว +1

    Quick Summary on Calling method - Whether we need obj creation or not:
    Static method calling inside Static method -> Method Can be accessed directly, No Obj creation needed.
    Static method calling inside Non-Static method -> Method Can be accessed directly, No Obj creation needed.
    Non-Static method calling inside Static method -> Method Cant be accessed Directly, Obj creation needed.
    Non-Static method calling inside Non-Static method-> Method Cant be accessed Directly, Obj creation needed.
    (note: Correct me if I am wrong, Guys !)

  • @thangarajt.priyananthi3813
    @thangarajt.priyananthi3813 3 ปีที่แล้ว +1

    Deep and clear explanation

  • @jaymohan7233
    @jaymohan7233 3 ปีที่แล้ว

    Hi we can call a static method from the non-static method, but not other way around (you mentioned as otherwise) please change 0.29

  • @haripriya3449
    @haripriya3449 10 หลายเดือนก่อน

    Bro, Can u plz tell me y we use static keyword in main method? In all interviews they are asking and please tell me y we wnt to use main method?

  • @dinesh.b9260
    @dinesh.b9260 10 หลายเดือนก่อน

    Hai bro how can i get only core java text files for studding.

  • @rangaraja6330
    @rangaraja6330 2 ปีที่แล้ว

    Awesome Man

  • @nishap769
    @nishap769 3 ปีที่แล้ว +3

    Hi Arul,
    Is static variable always be initialized as shown in the example:
    static int accountBalance = 0;

    • @kavibharathip2468
      @kavibharathip2468 2 ปีที่แล้ว

      Having same doubt
      If you were cleared means let me know sis

    • @nagulrd5214
      @nagulrd5214 2 ปีที่แล้ว +1

      @@kavibharathip2468 no need we can initialize as per our wish static int a = 10; even static int a ; ,,,,,, or static int a = null; ,,,, after that where ever need u can initialize

  • @HemaNemoo
    @HemaNemoo 4 ปีที่แล้ว

    நனி மிகு நன்றி👍

  • @contactjayanthi2990
    @contactjayanthi2990 ปีที่แล้ว

    Hi Sir,
    Could you please upload the video about Scanner in this java crash course playlist.

    • @LearnAutomationOnline
      @LearnAutomationOnline  ปีที่แล้ว

      Java Crash course is for core Hava concepts and programming fundamentals. In java programs Playlist, scanner concepts are there

  • @explorewithgowri732
    @explorewithgowri732 3 ปีที่แล้ว

    Why did u called accountbalance variable using object even though we declared that variable using static? We could have called that without using object right?

  • @geetharajendren6964
    @geetharajendren6964 2 ปีที่แล้ว

    good explanation

  • @bagavathsingha5523
    @bagavathsingha5523 3 ปีที่แล้ว

    Anna we can't use static keyword to class..because it will not allow as to create object

  • @thinakaranrajendran2666
    @thinakaranrajendran2666 5 ปีที่แล้ว +2

    Hi Bro, If we need not to create object to call a static method, then what is the significance of methods which doesn't static.? Can we always create static methods?

    • @LearnAutomationOnline
      @LearnAutomationOnline  5 ปีที่แล้ว +7

      Then there is no point in using object oriented programming. But this is an interesting question though. This should be asked and answered by the developer himself. Should this method really be called, even of there are no objects created? If yes make it a else, non static. Static methods consumes a significant amount of memory. Polymorphism goes out if the methods are static. As static methods can't be overridden. Like these there are multiple reasons.

  • @iyeswaryaraju5749
    @iyeswaryaraju5749 4 ปีที่แล้ว

    Hi Arul please can u explain me what is the difference between block and method?

    • @LearnAutomationOnline
      @LearnAutomationOnline  4 ปีที่แล้ว +4

      Both are not comparable. Block is just a section in which the code is written. For methods also there are blocks. {} Anything which reside I aide these curly braces are blocks. Blocks are associated with methods, classes, even plain static blocks are also available. Method is one which we write to accomplish a specific task

    • @iyeswaryaraju5749
      @iyeswaryaraju5749 4 ปีที่แล้ว +1

      Thanks arul

  • @sriyt6286
    @sriyt6286 3 ปีที่แล้ว

    Bro I declare two variables one is static variable and another one is normal variable but two variables are same name how it's possible explain pannu ga bro please.

    • @sriyt6286
      @sriyt6286 3 ปีที่แล้ว

      Static variable declare inside the class,
      Normal variable declare inside method both are same name and declare inside the same class how it's possible bro please. 🤔

    • @sriyt6286
      @sriyt6286 3 ปีที่แล้ว

      class ss{
      static int i=1;
      void add(){
      int i=2;
      }
      }
      OUTPUT: 2

    • @LearnAutomationOnline
      @LearnAutomationOnline  3 ปีที่แล้ว +1

      One is class level and another is local inside a method. That's allowed

  • @suganyamuthu9560
    @suganyamuthu9560 4 ปีที่แล้ว

    Bro when I practice, while doing the static block example, even though I created object for the static block, I can get the correct output in console.
    I give two static blocks and created object for them separately and I call the static block by the object. It gives the output.

    • @mjbala777
      @mjbala777 2 ปีที่แล้ว

      As bro said in video, it throws a warning when you are calling a static method from static main method...so compiler will run... But you can't call a non static method from main method without creating object