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 is bytecode in java ?
What do you know about java?
What is a method vs function?
What is currentthread()?
Is there any limitation of using inheritance?
What are the differences between forwarding () method and sendredirect() methods?
What is the size of arraylist in java?
When throws keyword is used?
Can you call a method in a method?
what is aggregation in java?
What is jvm? How its run?
What are class members by default?
Why is the singleton pattern considered to be an anti pattern?
Can we call thread start () twice?
What is predicate in java?