The ________ keyword is used to declare objects that cannot change.
- final
- static
- transient
- volatile
The final keyword in Java is used to declare objects that cannot change after they are initialized. It can be applied to variables, methods, and classes to make them unmodifiable, constant, or not extendable, respectively.
Loading...
Related Quiz
- The method read() of FileReader class returns ________ when the end of the file is reached.
- The ________ method of DatagramSocket class is used to send a packet to a server.
- How can you securely serialize and deserialize objects to protect sensitive information during the process?
- The InetAddress class provides methods to get the IP address of a local computer by using method ________.
- How can SQL Injection be prevented when executing queries using JDBC?