What is the final access modifier in java?



What is the final access modifier in java?..

Answer / Gaurav Chaudhary

The 'final' keyword in Java can be used to declare a variable as constant, make a method unoverridable by subclasses, and prevent a class from being subclassed.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Is there any way to find whether software installed in the system is registered by just providing the .exe file? I have tried the following code but its just displaying the directory structure in the registry. Here the code : package com.msi.intaller; import java.util.Iterator; import ca.beq.util.win32.registry.RegistryKey; import ca.beq.util.win32.registry.RootKey; public class RegistryFinder { public static void main(String... args) throws Exception { RegistryKey.initialize(RegistryFinder.class.getResource("jRe gistryKey.dll").getFile()); RegistryKey key = new RegistryKey(RootKey.HKLM, "Software\\ODBC"); for (Iterator<RegistryKey> subkeys = key.subkeys(); subkeys.hasNext();) { RegistryKey subkey = subkeys.next(); System.out.println(subkey.getName()); // You need to check here if there's anything which matches "Mozilla FireFox". } } }

1 Answers   Google,


What is regex in java?

1 Answers  


What is a class in java?

1 Answers  


How many arguments can be passed to main ()?

1 Answers  


What is java autoboxing?

1 Answers  


What is method reference in java?

1 Answers  


How can we run a java program without making any object?

1 Answers  


wahts is mean by thread?

22 Answers   HCL, TCS,


When throw keyword is used?

1 Answers  


Are private methods final?

1 Answers  


What is the advantage of functional interface in java 8?

1 Answers  


What is the benefit of using enum to declare a constant?

1 Answers   Aspire, Infogain,


Categories