Answer Posted / ravikiran(aptech mumbai)
Interface is purely abstract.all the methods declared inside
the interfaqce are by default abstract and public.
where as an abstract class can have abstarct as well as non
abstact methods.
And an abstract class may heve no abstract methods at all.
we will do like this to restrict the creation of instance
ofthat particular class.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Why we cannot override static method?
Can a static method be final?
What is the symbol for average?
How do you square a number?
What is the use of optional ?
What state is a thread in when it is executing?
How does arraylist work in java?
Can we override protected method in java?
What is finalize()?
Is there any difference between synchronized methods and synchronized statements?
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?
Write a program to show whether a graph is a tree or not using adjacency matrix.
How destructors are defined in java?
What are advantages of using Java?s layout managers than windowing systems?
Is it possible to use string in the switch case?