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
Write a java program to count the number of words present in a string?
How does hashset works in java?
What are the new features in java 8?
What are the four versions of java?
What is boolean in java?
Can you access the private method from outside the class?
Which is better singleton or static class?
Is null a value?
What is array size in java?
Explain the difference between runnable and callable interface in java?
Can we sort array in java?
Explain garbage collection in java?
How do you reverse sort a list in java?
Explain the Propertie sof class?
What does the “static” keyword mean? Can you override private or static method in java?