What is non static block in java
Answer Posted / mohan
In between {....}whatever u can write that consider as
Instance block or Non static block.
Ex:
class hai{
//Instance block
{
System.out.println("hi i'm Instance block....");
}
//Static block
static{
System.out.println("hi i'm Static block....");
}
}
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What is boolean false?
What is the meaning of variable in research?
Can a abstract class be defined without any abstract methods?
What is a heavyweight component?
What is the purpose of a volatile variable?
How do you reverse a string in java?
what is instanceof operator used in java?
I want to persist data of objects for later use. What’s the best approach to do so?
What is the difference between class & object?
Why lambda expression is used in java?
What is thread start?
What is the syntax and characteristics of a lambda expression? Explain
What is palindrome in java?
Why string is not thread safe?
What is the protected method modifier?