✏️ Explanatory Question

What happens if a method doesn’t return a value?

👁 5 Views
📘 Detailed Answer
🟢 Easy
💡

Answer with Explanation

    • If return type is void → OK

    • Otherwise → compile-time error