Linked Questions

2 votes
3 answers
3k views

Let's say i have a method being called by passing an object. public String retrieveXyz(Criteria criteria){ //get some info out of criteria and do something. } Is it a good practice to make the ...
Vivek Vermani's user avatar
6 votes
2 answers
2k views

Effective dart specifies that top-level variables should be final when applicable: https://dart-lang.github.io/linter/lints/prefer_final_fields.html However, I could not find any information about ...
Alexey Subbotin's user avatar
4 votes
1 answer
4k views

I'm a bit confused, my Intellij Idea warns me if no final modifiers everywhere when possible. Actually final is very good option, and of course its needed in lots of cases like methods parameters, ...
Yura Galavay's user avatar
0 votes
1 answer
1k views

What is the use of using final keyword for local primitive variables in java. Is there any performance benefit ?
Debapriya Biswas's user avatar
0 votes
3 answers
2k views

My program reads data from socket and now I want to display that data in a textbox. I splitted the data into seperate variables and here is my code: final int aData = 0; ...
MKS's user avatar
  • 786
0 votes
3 answers
684 views

The issue of using or not using the Java final keyword has been discussed many times on SO. I am trying to collect some well-known open source Java projects that are using it. I haven't found any so ...
jabal's user avatar
  • 12.5k
-1 votes
5 answers
225 views

In C++, as much as I know, it is a good practice to add const parameter to these variables which are not going to change and to these methods, which return values, for example: bool ExpenseManager::...
user3178137's user avatar
0 votes
2 answers
444 views

I use PMD tool to find errors in java code if any. One common suggestion PMD gives is that "Local variable {local_variable} could be declared final". Is it necessary to declare all local variables as ...
Jeevan Patil's user avatar
  • 6,079
2 votes
4 answers
150 views

In this example, what value does declaring Object final offer? private void doSomethingClever(final Object o) { }
James Raitsev's user avatar
-3 votes
3 answers
258 views

Consider the following declaration at the top of a class: static int intVal = 42; static String strVal = "Hello, world!"; Can we improve performance on Android with the final keyword?: static final ...
sailakshmi's user avatar
-1 votes
2 answers
123 views

I see some codes that have method implementation as public void setVariables(final int value){ this.value=value; } why is the final keyword used in the parameter. why not declare public void ...
eagertoLearn's user avatar
  • 10.3k

15 30 50 per page
1
2