215k views
0 votes
If a static field can’t be initialized in a single statement, you can initialize it in a ________________________.

User JohnP
by
5.5k points

1 Answer

2 votes

Answer: Static initializing block

Explanation: Static initializing block, which is also known as the static block which is a type of the code .The code executes its work every moment when a particular class gets into the memory.It helps in the basic logging and the initialization or setting the static variables in the statement.This process is implemented over the constructor unit in java.

User Alexey Bondarchuk
by
6.7k points