Skip to main content

All Questions

Tagged with
4 votes
3 answers
2k views

How useful is JNI in android?

In java/android we can call code written in the c/c++ language for execution speed advantage. I have heard of Ahead Of Time compilation which (as far as i know) compiles the entire application to ...
pebble's user avatar
  • 151
-1 votes
1 answer
1k views

Duplicate code to avoid performance decrease due to function calls? [closed]

I have a simple list in Java that I need to search using one of two methods. The first method simply returns the position in the list of the first matching element. The second filters out any elements ...
Chris Cirefice's user avatar
3 votes
1 answer
280 views

How are objects treated in an anonymous inner class?

Lets take this for example... entryText.addTextChangedListener(new TextWatcher() { TextView wordCount = (TextView) findViewById(R.id.wordCount); TextView charCount = (TextView) findViewById(...
user3439343's user avatar
1 vote
2 answers
2k views

Static vs. dynamic memory allocation - lots of constant objects, only small part of them used at runtime

Here are two options: Option 1: enum QuizCategory { CATEGORY_1(new MyCollection<Question>() .add(Question.QUESTION_A) .add(Question.QUESTION_B) ...
k29's user avatar
  • 113