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
Explain spliterator in java8?
give an example for encapsulation?
worst case complexities of Quick sort and Merge sort.
Which class cannot be a subclass in java?
Describe what happens when an object is created in java ?
What does jre stand for?
State the difference between creating string as new () and literal.
What is the difference between checked exception and unchecked exception?
What is boolean keyword in java?
What are keywords and reserved words in java?
Define an abstract class with reference to java.
Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?
What is java developer skills?
What is a final class ?
What is the purpose of finalization in java programming?