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 program to show whether a graph is a tree or not using adjacency matrix.
how we can create packages in java?
What will happen if a thrown exception is not handled?
Explain try and catch keywords in java?
'A class is a template for an object' explain this statement.
Can a final variable be initialized in constructor?
What is the collections api?
How would you format a date in java? I.e. In the ddmmyyy format?
What are three types of loops in java?
Is this valid in java ? Can we instantiate interface in java?
What is type safety in java?
What is Java Reflection API? Why it’s so important to have?
What is main string [] args?
How do you check if a character in a string is a digit or letter?
Explain method local inner classes ?