30 - Understanding Static Methods and Attributes in Java - Mr. Hollaway's Foundational Java Skills

Опубликовано: 17 Апрель 2026
на канале: mr hollaway's code and tech tutorials
19
1

In this video we dive into the concept of static methods and static attributes in Java, crucial for understanding class-level operations. This video is designed for beginners, aiming to demystify the static keyword and its implications. Static methods and attributes belong to the class, rather than any instance of the class, allowing them to be accessed without creating an object. We'll discuss how static attributes can be used to share data between all instances of a class and how static methods can perform operations without relying on instance data. Through practical examples, you'll learn the advantages and appropriate use cases for static members in Java programming, enhancing your ability to write efficient and organized code.

00:00 Introduction
00:19 Method Review
00:46 Creating an object
02:30 Static method - Math class
05:01 Breaking down static methods visually
06:40 Making a static method
07:11 Calling a static method
13:09 Static attributes

Related Videos:
23 - Understanding Classes and Objects in Java -    • 23 - Understanding Classes and Objects in ...  
24 - Classes: Instances and Attributes in Java -    • 24 - Classes: Instances and Attributes in ...  
25 - Classes: Constructors, Parameters and Overloading -    • Video  
26 - Understanding the 'This' Keyword in Java Classes -    • 26 - Understanding the 'This' Keyword in J...  
27 - Methods in Java Classes: Creation and Invocation -    • Video  
28 - Getter and Setter Methods in Java -    • 28 - Getter and Setter Methods in Java - M...  
29 - Java Methods: Multiple Parameters, Arguments, Overloading -    • 29 - Java Methods: Multiple Parameters, Ar...  
31 - Inheritance in Java: Extending Classes, Super keyword -    • Video  
32- Super Keyword, Overriding Methods in Java -    • 32- Super Keyword, Overriding Methods  in ...