What is meant by final class, methods and variables?

Answers were Sorted based on User's Feedback



What is meant by final class, methods and variables?..

Answer / narasimha

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

What is meant by final class, methods and variables?..

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

What is meant by final class, methods and variables?..

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

Post New Answer

More Core Java Interview Questions

What do you mean by thread safe?

0 Answers  


Does sprintf allocate memory?

0 Answers  


Does java isempty check for null?

0 Answers  


Why does java not support pointers?

0 Answers  


What are the access modifiers available in java?

0 Answers  


Can list be null in java?

0 Answers  


How do you format in java?

0 Answers  


How do you compare arrays in java?

0 Answers  


If a method is declared as protected, where may the method be accessed in java programming?

0 Answers  


In real time project which driver did u use? What is the main functionality of the Prepared Statement?

3 Answers   Photon,


How can you read an integer value from the keyword when the application is runtime in java? example?

0 Answers   HCL,


what is difference between business delegate and data access object(dao)? in java?

1 Answers  


Categories