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
In java, how we can disallow serialization of variables?
Why is serialization required?
Define max and min heap, also the search time of heap.
What is string [] java?
What is the arraylist in java?
Can we change the value of static variable?
What are the benefits of java?
What are the two types of java programming?
How do you replace a string in java?
What is a singleton puppy?
Are primitives objects?
What are the characteristics of java?
Why is static used?
How does callback work in java?
Difference between static synchronization vs. Instance synchronization?