What is non static block in java
Answer Posted / avneet singh bhatia
Any method which is not the part of main function or not be
declared with any static keyword is non static block in java
For example:
class Abc
{
void show()//non static method
{
System.out.println("non static block");
}
static
{
S.O.P("static");
}
}
| Is This Answer Correct ? | 8 Yes | 4 No |
Post New Answer View All Answers
What are the differences between string, stringbuffer and stringbuilder?
Is integer immutable in java?
Can we increase array size dynamically in java?
what is a green thread? : Java thread
What is replaceall in java?
how its run?
Explain working of call by reference function invoking.
What is the purpose of a transient variable?
What is the difference between super class & sub class?
What does the string method compareto () do?
What does java ide mean?
Can java run on google chrome?
What is public/private protected in java?
What is object-oriented programming?
Can we execute a program without main?