Which one executed first static block or static methods in java?

Java

1 answer

Answer

1241521

2026-05-31 20:36

+ Follow

Static Blocks are always executed first.

A static block is executed when your class is charged but a static method is executed only when is called, therefor first the class is charged and then is executed a method.

ReportLike(0ShareFavorite

Related Questions

Copyright © 2026 eLLeNow.com All Rights Reserved.