final tag

3 questions


1 answers
106 views
0
Where is the final class used in Java?

I read a book about Java. It said that all classes can be declared final. But I don't know where to use the final class. I just learned this new method, so I wonder if programmers actually apply it to...

1 years ago

1 answers
145 views
0
Question about java array constants.

When declaring an array final int[] arr = {1, 2, 3, 4, 5};If I do this, I can't just change the address value of the arr, but I can change the arrangement contents, right?I want to constant the array ...

1 years ago

1 answers
91 views
0
[Java Basics] Question about using the final constant in the switch case statement.

I know that if-else statements are more efficient, but it is a homework that needs to be solved with a switch case.//final int myS = 'A' works, but it is entered by the scanner method and the case exp...

1 years ago

© 2024 OneMinuteCode. All rights reserved.