What is meant by final class, methods and variables?
Answers were Sorted based on User's Feedback
when you declare a class as final, that class cannot be
extended.In java "String" class is final.
when you declare the variable as final then we can
intialize it only once.it is constant.
when declare the method as final we cannot override the
method
Is This Answer Correct ? | 12 Yes | 0 No |
Answer / ravikiran(aptech mumbai)
final class:Is the one which cann't be subclassed
final method:Is the one which cann't be overrided
final variable:is the one which acts like a constant
Is This Answer Correct ? | 12 Yes | 1 No |
Answer / suresh chand
final class: we can't inherit that class
final method: we can't override that method
final variable: we can't change the value of that var.
Is This Answer Correct ? | 9 Yes | 0 No |
Explain the scope of a variable.
What is meant by inheritance and what are its advantages?
when asub class inherits a super class and overrides a public method of super class in sub class(public method in super class). why these methods needs to be public in sub class. (otherwise compile time error).
What is subsequence of a string?
which pattern is default in scanner package?
Define locale.
What are daemon Threads in java?
There are 2 different ways to create an object. a)By using keyword "new" b)By using Class.forName ("className").newInstance(); What is the difference between these 2 methods.
Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.
What is meant by vector class, dictionary class, hash table class, and property class?
Is minecraft 1.15 out?
Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)