How we can execute any code even before main method?

By ayush goel in 22 Sep 2023 | 11:29 am
ayush goel

ayush goel

Student
Posts: 346
Member since: 21 Sep 2023

How we can execute any code even before main method?

22 Sep 2023 | 11:29 am
0 Likes
divas goyal

divas goyal

Student
Posts: 453
Member since: 22 Sep 2023

- You can execute code before the `main` method by using a `static` block. `static` blocks are executed when the class is loaded.


23 Sep 2023 | 04:25 pm
0 Likes

Report

Please describe about the report short and clearly.