You are not logged in.

#1 2016-01-20 07:12:44

Muhammad
User RankUser RankUser RankUser RankUser RankUser Rank
بِسمِ اللَّهِ الرَّحمٰنِ الرَّحيمِ
From: Sahiwal Division
Registered: 2012-03-22
Posts: 22,197
Website

What is static block?

Java Quizzes Java Language Input Output

Question:
What is static block?

Option A):
It is used to initialize the static data member., It is excuted before main method at the time of class loading.
Option B):
There is no such block.
Option C):
It is used to create syncronized code.
Option D):
None of these

Correct Answer is Option A):
It is used to initialize the static data member., It is excuted before main method at the time of class loading.

Explanation:
static block is used to initialize the static data member.It is executed before main method at the time of loading of a class.


Online Web Tutorials And Interview Questions With Answers Forum:
https://globalguideline.com/forum/

2016-01-20 07:12:44

Advertisement
Ads By Google

Re: What is static block?



\n

Board footer