Java Tutorial For Beginners 22 – 'static' keyword Example in Java

///Java Tutorial For Beginners 22 – 'static' keyword Example in Java

Java Tutorial For Beginners 22 – 'static' keyword Example in Java

FavoriteLoadingAdd to favorites

★★★Top Online Courses From ProgrammingKnowledge ★★★
Python Programming Course ➡️ ⚫️
Java Programming Course ➡️ ⚫️
Bash Shell Scripting Course ➡️ ⚫️
Linux Command Line Tutorials ➡️ ⚫️
C Programming Course ➡️ ⚫️
C++ Programming Course ➡️ ⚫️
PHP Programming Course ➡️ ⚫️
Android Development Course ➡️ ⚫️
C# Programming Course ➡️ ⚫️
JavaFx Programming Course ➡️ ⚫️
NodeJs Programming Course ➡️ ⚫️
Jenkins Course For Developers and DevOps ➡️ ⚫️
Scala Programming Tutorial Course ➡️ ⚫️
Bootstrap Responsive Web Design Tutorial ➡️ ⚫️
MongoDB Tutorial Course ➡️ ⚫️
QT C++ GUI Tutorial For Beginners ➡️

Java468x60

★★★ Online Courses to learn ★★★
Get 2 FREE Months of Unlimited Classes from skillshare –
Data Science – |
Machine Learning – |
Artificial Intelligence – |
MERN Stack E-Degree Program – |
DevOps E-degree – |
Data Analytics with R – |
AWS Certification Training – |
Projects in Java – |
Machine Learning With TensorFlow – |
Angular 8 – Complete Essential Guide –
Kotlin Android Development Masterclass –
Learn iOS Programming Building Advance Projects –

★★★ Follow ★★★
My Website –

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
Searches related to java static meaning
static method in java
define static java
difference between static and nonstatic methods in java
use of static in java
when to use static methods in java
how to call static method in java
difference between static method and non static method in java
accessing non static from static method

source

By |2019-11-22T00:02:23+00:00November 22nd, 2019|Java Video Tutorials|32 Comments

32 Comments

  1. Autif Kamal November 22, 2019 at 12:02 am - Reply

    On line 11 of Student.java, you don't suffer any consequences from removing the static keyword from getNoOfStudents. Why do you still need to include static with it?

  2. saniya .s November 22, 2019 at 12:02 am - Reply

    Bro..I got error..a Java exception has occured

  3. yuan qi November 22, 2019 at 12:02 am - Reply

    I guess the int age and string name should be private

  4. Bestryful HD November 22, 2019 at 12:02 am - Reply

    i dont know why i love you sensi:)))))))))))))))))))))))))))
     may god reward you in judgrment day ameen

  5. VibrantVirtue November 22, 2019 at 12:02 am - Reply

    What's the use of it

  6. Shaik Ansar Basha November 22, 2019 at 12:02 am - Reply

    Please increase volume.explanation is excellent

  7. aman jain November 22, 2019 at 12:02 am - Reply

    why write getters and setters in here. not required!

  8. David Song November 22, 2019 at 12:02 am - Reply

    The Fire alarm, smoke detector!!

  9. RazerX YT November 22, 2019 at 12:02 am - Reply

    syso ctrl + shift dosent work for me

  10. Smart Programming November 22, 2019 at 12:02 am - Reply

    important concept, thanks for this sir 👍👍

  11. SUNGHYUN LEE November 22, 2019 at 12:02 am - Reply

    Nice tutorials. Does anyone know what 'This.age' mean? What is the real purpose of 'this'?
    thanks all

  12. Madhu Shree November 22, 2019 at 12:02 am - Reply

    am not able to print message . when i declare method as static
    MyClassStctic.DoSomthing("hi hello howw are u");
    when i run the pgm , it does not give op . bt if i declare static variable am able to get op.

  13. satyam gadadas November 22, 2019 at 12:02 am - Reply

    Awesome videos for beginners. Thank You so much.

  14. Nidhi Verma November 22, 2019 at 12:02 am - Reply

    what use of these line
    in this programm….?

    without using these line
    output remains same.

    String name;
    int age;

    public String getName() {
    return name;
    }
    public void setName(String name) {
    this.name = name;
    }
    public int getAge() {
    return age;
    }
    public void setAge(int age) {
    this.age = age;

  15. Kino -Imsure1200q November 22, 2019 at 12:02 am - Reply

    who saw getnoofstudenta?

  16. rajat batra November 22, 2019 at 12:02 am - Reply

    hey !if we dont use static keyword in this example wt will happen

  17. hemm November 22, 2019 at 12:02 am - Reply

    thanks Sir.

  18. Jeffrey Kornhauser November 22, 2019 at 12:02 am - Reply

    Great tutorial. It seems like in general, using static variables and methods are more a matter of convenience, that is, everything you can ever want to do can theoretically be done non-statically. I'm curious if this is correct.

  19. Sachin Bhujbal November 22, 2019 at 12:02 am - Reply

    Thanks for the Tutorials

  20. Deepa Nair November 22, 2019 at 12:02 am - Reply

    Boom!! thumbs up

  21. Nazari Milad November 22, 2019 at 12:02 am - Reply

    Hi there, why should we prefer Static over non static, both variable and method wise? Excellent videos BTW

  22. S SATHISH BABU November 22, 2019 at 12:02 am - Reply

    Is it necessary to have a method to be static for accessing a static variable ?

  23. Randy Burinsky November 22, 2019 at 12:02 am - Reply

    Great video. I am taking Java in school and watch these videos a long with the lesson to really understand the concepts.

  24. Anubhav Rayamajhi November 22, 2019 at 12:02 am - Reply

    what the heck is instance man

  25. Rakesh sasadara November 22, 2019 at 12:02 am - Reply

    thanks sir

  26. Никонюк Сергій November 22, 2019 at 12:02 am - Reply

    syso + Ctrl + Shift doesn't work 🙁

  27. 김민성 November 22, 2019 at 12:02 am - Reply

    It's a good example for 'static' , Thanks ^^

  28. Jibran Zia November 22, 2019 at 12:02 am - Reply

    Later in the video you declare an instance of the Student class(Mark and Tom) and access the static method of getNoOfStudents which should've been accessed directly via the Class itself  (Student.getNoOfStudent) but you've called it via the instance of that class i.e (tom.getNoOfStudents)so isn't it contradicting with what you've explained in the previous video.

  29. Siyuan Huang November 22, 2019 at 12:02 am - Reply

    make the speed 1.5 and it sounds normal lol

  30. Chalapathi Devarakonda November 22, 2019 at 12:02 am - Reply

    Tutorial 21 & 22 together given excellent explanation for static keyword and how get & set methods populated using  Eclipse IDE features. I like the explanation with the example of Noofstudents static variable and how its value incremented within the  Constructor when students (mark,tom…) added one after other. 

  31. Emil Hozan November 22, 2019 at 12:02 am - Reply

    This was a fairly good explanation, however the calling of methods, static vs. non-static, didn't make too much sense. Maybe I am just now understanding

  32. Ahmad Zuman November 22, 2019 at 12:02 am - Reply

    good video
    please try to increase the frame rate a little bit more so the video doesn't look like it's lagging

Leave A Comment

*