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 diamond operator in java?
How to do encapsulation in java?
What are advantages and disadvantages of OOPs?
What are the parts of a method?
Can memory leak happen java?
How do I get the | symbol on my keyboard?
What is difference between pointer and reference?
Does java linked list allow duplicates?
What are JVM.JRE, J2EE, JNI?
What is the difference between a loader and a compiler?
Does hashset allow duplicates in java?
What will happen when using pass by reference in java?
what are Hostile Applets?
What is re-factoring in software?
What exactly is java?