✏️ Explanatory Question

What is a static function in Java?

👁 3 Views
📘 Detailed Answer
🟢 Easy
3
Total Views
10
Related Qs
0%
Progress
💡

Answer with Explanation

A static method belongs to the class, not to objects.


static void display() {
    System.out.println("Static method");
}

✅ Called using:


ClassName.display();