what is the difference between statis block and static
variable
Answer Posted / suresh.m
staticblock,static variables,static method are executed
before creating an object to be created to class.i think
there is no difference between them.
| Is This Answer Correct ? | 2 Yes | 11 No |
Post New Answer View All Answers
What do you mean by composition in java?
What is executor memory?
2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?
How to set the permissions to a file in java?
What kind of variables can a class consist?
Is string a wrapper class?
Is int a class in java?
Write a java program to print fibonacci series?
Can you add null to a list java?
What is meant by object oriented programming – oop?
Can a boolean be null java?
What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?
Is final static java?
When can we say that threads are not lightweight process in java?
What is arrays sort in java?