ICT-App Dev Specialist FA study materials
ICT-App Dev Specialist FA study resources

ICT-App Dev Specialist FA practice questions

One question at a time. Build your ICT-App Dev Specialist FA understanding.

First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.

Continue in the practice tool above to load more questions, 50 at a time.

Question 1App Development

In a Flutter widget tree, which class should a developer extend to build a screen that can hold mutable state and rebuild when that state changes?

  1. RenderObjectWidget
  2. StatelessWidget
  3. StatefulWidget Correct answer.
  4. InheritedWidget

Explanation

A StatefulWidget owns a companion State object whose setState call schedules a rebuild, which is the standard way to hold mutable per-screen data. StatelessWidget is immutable and cannot trigger rebuilds on its own.

Question 2App Development

An Android activity needs to survive a configuration change such as a screen rotation without losing a list of user-entered items. Which approach is most appropriate?

  1. Save the list to SharedPreferences on each keystroke
  2. Store the list in a ViewModel scoped to the activity Correct answer.
  3. Store the list in a static companion object field
  4. Re-query the network on every recreation

Explanation

A ViewModel survives configuration changes because it is retained across activity recreation, making it the recommended holder for UI data that must outlive a rotation. Static fields leak and are not lifecycle-aware, and network re-query or per-keystroke persistence is wasteful.

Question 3App Development

In Swift, which keyword combination declares a constant whose value is fixed at compile time and cannot be reassigned?

  1. let Correct answer.
  2. static
  3. var
  4. lazy

Explanation

The let keyword introduces a constant binding in Swift; once assigned, the value cannot be reassigned. var declares a mutable variable, while static and lazy modify storage or initialization timing rather than mutability.

Question 4App Development

A REST API returns HTTP 401 for every request even though the client sends a bearer token. Which cause is most consistent with that status code?

  1. The requested resource path does not exist
  2. The user is authenticated but lacks the required role
  3. The token is expired or malformed so authentication failed Correct answer.
  4. The server rejected the request payload as too large

Explanation

HTTP 401 means the request lacks valid authentication credentials, so an expired or malformed token is the fitting cause. Authorization failures for an authenticated user are 403, missing resources are 404, and oversized payloads are 413.

Question 5App Development

Which Kotlin construct provides a concise way to handle a nullable value and supply a fallback when it is null?

  1. The lateinit modifier
  2. The Elvis operator ?: Correct answer.
  3. The safe call operator ?.
  4. The not-null assertion !!

Explanation

The Elvis operator returns the left operand if it is non-null and the right-hand fallback otherwise, which is exactly a null-coalescing pattern. Safe call only short-circuits, assertion throws, and lateinit defers initialization.

Question 6App Development

An iOS app must persist a small set of user preferences such as a chosen theme. Which storage mechanism is the conventional fit?

  1. Core Data
  2. Keychain
  3. FileManager with a plist
  4. UserDefaults Correct answer.

Explanation

UserDefaults is designed for small, simple preference values that are read frequently at launch. Core Data targets structured object graphs, Keychain targets secrets, and manual plist files are unnecessary overhead for preferences.

Question 7App Development

A developer wants to run a long database query off the main thread in an Android app and update the UI when it finishes. Which approach follows current guidance?

  1. Perform the query in a BroadcastReceiver's onReceive
  2. Call the query directly inside onBindViewHolder
  3. Use Thread.sleep to yield to the UI thread
  4. Launch a coroutine on Dispatchers.IO and collect the result on the main dispatcher Correct answer.

Explanation

Coroutines let you move blocking work to Dispatchers.IO and return to the main dispatcher for UI updates, keeping the main thread responsive. Direct calls on the UI thread, sleeping, or doing work in a receiver callback all risk blocking or misusing lifecycle.

Question 8App Development

In Flutter, which widget is best suited to display a long, scrollable list of items that are built lazily as they come into view?

  1. ListView.builder Correct answer.
  2. SingleChildScrollView
  3. Wrap
  4. Column

Explanation

ListView.builder constructs children lazily via an itemBuilder, which keeps memory bounded for long lists. Column and SingleChildScrollView build all children eagerly, and Wrap lays items out in lines rather than scrolling.

Question 9App Development

Which HTTP method is defined as safe and idempotent for retrieving a representation of a resource without side effects?

  1. GET Correct answer.
  2. CONNECT
  3. PATCH
  4. POST

Explanation

GET is defined as a safe, idempotent method used to retrieve a representation without changing server state. POST creates or processes data, PATCH partially modifies a resource, and CONNECT establishes a tunnel.

Question 10App Development

A team wants unit tests for a ViewModel that calls a repository. Which design makes the ViewModel easiest to test in isolation?

  1. Instantiate the real repository inside the ViewModel constructor
  2. Inject the repository through an interface implemented by a fake in tests Correct answer.
  3. Rely on the production network during test runs
  4. Call a global singleton repository directly from the ViewModel

Explanation

Depending on an abstraction lets tests substitute a fake or mock, so the ViewModel's logic is verified without real I/O. Hard-coded constructors, global singletons, and live networks create hidden dependencies that make tests slow and flaky.

Question 11App Development

In SwiftUI, which property wrapper should a view use to read an observable reference-type model owned elsewhere and rebuild when it changes?

  1. @Binding
  2. @ObservedObject Correct answer.
  3. @Environment
  4. @State

Explanation

@ObservedObject subscribes a view to an external observable object and invalidates the view when the object publishes changes. @State owns local value state, @Binding connects to a parent's state, and @Environment reads injected environment values.

Question 12App Development

Which Gradle file section declares third-party libraries that an Android app module compiles against?

  1. dependencies Correct answer.
  2. flavorDimensions
  3. buildTypes
  4. packagingOptions

Explanation

The dependencies block lists libraries and their configurations such as implementation, which is how the module resolves compile and runtime artifacts. buildTypes, flavorDimensions, and packagingOptions configure build variants and packaging behavior.

Question 13App Development

A mobile app caches API responses. Which cache-control directive instructs shared and private caches to revalidate with the origin before reusing a stored response?

  1. no-cache Correct answer.
  2. no-store
  3. public
  4. max-age=0 with immutable

Explanation

no-cache permits storing a response but requires revalidation with the origin before each reuse. no-store forbids storing entirely, immutable discourages revalidation, and public only widens who may cache.

Question 14App Development

Which JavaScript mechanism allows an async function to pause at a promise and resume with its resolved value using await?

  1. async/await with promises Correct answer.
  2. XMLHttpRequest synchronous mode
  3. Event delegation
  4. setTimeout callbacks

Explanation

async functions return promises and await suspends execution until the awaited promise settles, giving sequential-looking asynchronous code. Callbacks, synchronous XHR, and event delegation serve different purposes and do not pause execution this way.

Question 15App Development

An app must store API keys used to sign requests. Which practice best protects the key on a mobile device?

  1. Keep the key server-side and have the backend sign requests Correct answer.
  2. Store the key in a plaintext resource string
  3. Hardcode the key in the app's source code
  4. Log the key at startup for debugging

Explanation

Secrets shipped inside an app binary can be extracted, so signing should happen on a trusted backend the client calls. Hardcoding, plaintext resources, and logging all expose the key to anyone who inspects the app or logs.

Question 16App Development

In Flutter, which mechanism is designed to pass data down many widget levels without threading constructor parameters through every widget?

  1. InheritedWidget Correct answer.
  2. PageView
  3. FutureBuilder
  4. SnackBar

Explanation

InheritedWidget exposes data to descendants that register as dependents, so intermediate widgets need not forward it. FutureBuilder handles async snapshots, PageView scrolls pages, and SnackBar shows transient messages.

Question 17App Development

Which Android component is appropriate for scheduling deferrable work that should run even if the app process is killed?

  1. A raw Thread
  2. A Handler on the main looper
  3. An AsyncTask
  4. WorkManager Correct answer.

Explanation

WorkManager persists work requests and guarantees execution under system constraints even across process death and reboots. Raw threads, AsyncTask, and main-looper handlers are tied to the process and are not durable.

Question 18App Development

A team notices an app's list scrolls smoothly but images pop in late. Which change most directly addresses late image loading?

  1. Disable hardware acceleration
  2. Prefetch and cache decoded images ahead of the viewport Correct answer.
  3. Increase the list item height
  4. Move image decoding onto the main thread

Explanation

Prefetching and caching decoded images off the main thread means bitmaps are ready when items bind, eliminating late pop-in. Larger items, disabling acceleration, or decoding on the main thread would worsen performance.

Question 19App Development

In Kotlin, what does a data class automatically generate?

  1. Thread synchronization locks
  2. Serialization annotations
  3. equals, hashCode, toString, and copy Correct answer.
  4. A no-argument constructor only

Explanation

A data class derives equals, hashCode, toString, componentN, and copy from its primary constructor properties, reducing boilerplate. It does not add no-arg constructors, serialization annotations, or locking.

Question 20App Development

An iOS app crashes intermittently with a force unwrap of an optional that is sometimes nil. Which change removes the crash while preserving behavior?

  1. Disable assertions in the release build
  2. Use optional binding or nil-coalescing to handle the nil case Correct answer.
  3. Mark the property as implicitly unwrapped
  4. Replace the force unwrap with try!

Explanation

Optional binding or nil-coalescing handles the nil case explicitly, so the code no longer traps. try! and implicitly unwrapped optionals still crash on nil, and disabling assertions does not change runtime unwrap behavior.

Question 21App Development

Which technique best reduces the number of network round trips when an app loads a detail screen that needs a user profile and their recent orders?

  1. Add retries to each request
  2. Issue the requests sequentially with a sleep between them
  3. Batch the two requests into one endpoint or parallelize them Correct answer.
  4. Compress the JSON payloads

Explanation

Batching into a single endpoint or issuing the calls in parallel cuts latency caused by serial round trips. Sequential calls with sleeps add delay, retries do not reduce trips, and compression only shrinks payload size.

Question 22App Development

In Android, which file declares activities, permissions, and intent filters for an app?

  1. proguard-rules.pro
  2. build.gradle
  3. AndroidManifest.xml Correct answer.
  4. strings.xml

Explanation

AndroidManifest.xml is the app manifest that registers components, permissions, and intent filters with the system. build.gradle configures the build, proguard-rules.pro controls shrinking, and strings.xml holds localized strings.

Question 23App Development

A developer needs to verify that a JSON payload matches the app's expected schema before parsing. Which approach is most robust?

  1. Parse with regular expressions on the raw string
  2. Deserialize into typed models and validate required fields Correct answer.
  3. Ignore parse errors and show an empty screen
  4. Assume the server always returns valid data

Explanation

Deserializing into typed models surfaces structural mismatches, and explicit required-field checks catch missing data before it reaches the UI. Regex parsing, assumptions, and ignoring errors hide failures.

Question 24App Development

Which statement about the Android activity lifecycle is accurate?

  1. onPause always means the activity is being destroyed
  2. onCreate runs every time the activity becomes visible
  3. onResume runs before onCreate on first launch
  4. onStop runs when the activity is no longer visible, and onDestroy follows before it is removed Correct answer.

Explanation

onStop is invoked when the activity is no longer visible and is commonly followed by onDestroy if the instance is being torn down. onPause does not imply destruction, onCreate runs once per instance, and onResume always follows onCreate and onStart.

Question 25App Development

A team wants reproducible builds across developer machines and CI for an Android project. Which practice contributes most directly?

  1. Rely on each machine's installed Gradle version
  2. Pin dependency versions and commit the Gradle wrapper Correct answer.
  3. Disable dependency locking
  4. Use dynamic version ranges for all libraries

Explanation

Pinned versions plus a committed Gradle wrapper ensure every environment resolves the same toolchain and libraries. Dynamic ranges, machine-specific Gradle installs, and disabled locking invite drift.

Question 26App Development

In Jetpack Compose, which state API is designed to hold a value that composables read and that triggers recomposition only of the composables that read it?

  1. MutableState<T> Correct answer.
  2. Intent
  3. LiveData<T>
  4. Parcelable

Explanation

Compose observes snapshot state objects, and MutableState<T> is the canonical snapshot-backed holder. When its value changes, only composables that actually read that state are invalidated and recomposed. LiveData belongs to the Android View system and requires bridging through observeAsState.

Question 27App Development

A Swift developer marks a class property with the lazy modifier. Which behavior does that produce?

  1. The property is initialized only on first access and then stored. Correct answer.
  2. The property is recalculated every time it is read.
  3. The property is computed on a background thread automatically.
  4. The property is serialized into the app bundle at build time.

Explanation

A lazy stored property defers its initializer until the first read and then caches the result for subsequent accesses. This is useful for expensive setup that must not run during initialization. Lazy properties must be declared with var because the stored value changes after initialization.

Question 28App Development

An Android developer needs to run a coroutine that performs disk I/O and must not block the UI thread. Which dispatcher is intended for blocking file and database work?

  1. Dispatchers.Main
  2. Dispatchers.IO Correct answer.
  3. Dispatchers.Default
  4. Dispatchers.Unconfined

Explanation

Dispatchers.IO is backed by a pool sized for blocking I/O operations such as file and database access. Dispatchers.Default is sized for CPU-bound work, so using it for blocking calls can starve the pool. Dispatchers.Main is reserved for UI updates on the main thread.

Question 29App Development

In Flutter, a developer needs to display a small badge over an icon inside a widget tree. Which widget is purpose-built to overlay one child on top of another with alignment control?

  1. Expanded
  2. Stack Correct answer.
  3. Flexible
  4. Padding

Explanation

Stack positions children relative to its own edges and allows later children to paint over earlier ones, which suits badge overlays. Alignment and Positioned children control where each layer sits. Padding, Expanded, and Flexible only affect layout space, not layering.

Question 30App Development

An Android app must survive configuration changes such as rotation without re-fetching a list from the network. Which approach keeps the loaded data across recreation of the activity?

  1. Store the list in a companion object on the activity class.
  2. Hold the list in a ViewModel scoped to the activity. Correct answer.
  3. Save the list in the activity's onPause callback only.
  4. Reload the list in onCreate after each configuration change.

Explanation

A ViewModel survives configuration changes because it is retained by the ViewModelStore tied to the activity, so loaded data is not lost. This avoids redundant network calls while keeping the data lifecycle-scoped. Static holders leak and are not lifecycle-aware.

Question 31App Development

A React Native screen renders a list where each row is a component. Which prop on a FlatList item is used by React to match elements across re-renders efficiently?

  1. accessibilityLabel
  2. ref
  3. key Correct answer.
  4. style

Explanation

React uses the key prop to identify which items changed, were added, or were removed during reconciliation. Stable keys let the renderer reuse component instances instead of remounting rows. Without keys, list updates become slower and state can attach to the wrong row.

Question 32App Development

A team publishes an Android app bundle to Google Play. Which artifact does the store generate for each device so users download only the resources their device needs?

  1. Split APKs tailored to the device configuration. Correct answer.
  2. A single universal APK containing all densities and languages.
  3. A source archive that compiles on the device.
  4. A web bundle served through a browser shell.

Explanation

App bundles let the store produce configuration splits so each device receives only the code and resources it needs. This reduces download size compared with a universal APK. The splits are signed and delivered by the store, not compiled on the device.

Question 33App Development

In Swift, a developer needs to define a type that conforms to a protocol but must be shared by reference and support inheritance. Which declaration keyword is required?

  1. extension
  2. class Correct answer.
  3. struct
  4. enum

Explanation

Only classes provide reference semantics and support inheritance in Swift. Structs and enums are value types and cannot inherit from another type. A class can also declare protocol conformance, satisfying the requirement.

Question 34App Development

A team wants to detect a memory leak in an Android app where an activity is retained after the user navigates away. Which tool is designed to capture and inspect the heap to find retained instances?

  1. Android Studio Memory Profiler heap dump Correct answer.
  2. Network Inspector
  3. Logcat with the verbose filter
  4. Layout Inspector

Explanation

The Memory Profiler can capture a heap dump and show which objects retain an activity instance, which is the standard way to confirm a leak. LeakCanary automates similar detection by watching for retained references. Logcat, Layout Inspector, and Network Inspector do not analyze object retention.

Question 35App Development

A developer writes a Kotlin suspend function that calls a repository. Which property makes it safe to call this function from the main thread without blocking the UI?

  1. The function is marked inline.
  2. The function returns a nullable type.
  3. The function is declared private.
  4. Suspension points allow the underlying work to resume without blocking the calling thread. Correct answer.

Explanation

Suspend functions can pause at suspension points and resume later, freeing the calling thread instead of blocking it. The actual blocking work must still be dispatched to an appropriate dispatcher such as IO. Suspendability itself is what prevents the main thread from being tied up during the wait.

Question 36App Development

A Flutter app's widget rebuilds frequently because a parent setState is called often. Which technique best limits rebuilds to the subtree that actually depends on the changing value?

  1. Wrapping the changing value in a ValueNotifier and using ValueListenableBuilder around the dependent widget. Correct answer.
  2. Converting the whole screen into a StatelessWidget.
  3. Calling setState at the root of the app on every change.
  4. Increasing the frame budget in the engine configuration.

Explanation

ValueListenableBuilder subscribes only the widgets inside its builder to the notifier, so changes rebuild that subtree instead of the whole screen. This narrows the rebuild scope and improves frame times. Root-level setState does the opposite by invalidating large portions of the tree.

Question 37App Development

An iOS app must decode JSON where a field may be absent in older server responses. Which Swift declaration allows the property to decode without failing when the key is missing?

  1. A non-optional property with a default value in the initializer.
  2. A property declared as a computed var without a setter.
  3. An optional property decoded with decodeIfPresent. Correct answer.
  4. A property marked with the final keyword.

Explanation

decodeIfPresent returns nil when the key is absent, which matches an optional property and prevents a keyNotFound error. Non-optional decoding with decode throws if the key is missing. Using optionals for genuinely optional fields keeps decoding resilient across server versions.

Question 38App Development

An Android app needs to expose a small dataset to another app for one-time selection and return a result. Which mechanism is the modern recommended approach for this inter-app interaction?

  1. Broadcasting a sticky intent with the dataset attached.
  2. Writing to external storage and asking the other app to poll.
  3. A static singleton shared through a content provider.
  4. The Activity Result API with a contract that launches an intent. Correct answer.

Explanation

The Activity Result API registers a callback and launches an intent, receiving the result in a lifecycle-aware way. It replaces the deprecated onActivityResult request-code pattern. This is the recommended path for user-driven inter-app flows that return data.

Question 39App Development

A team needs to add a dependency only for running local unit tests in an Android module. Which Gradle configuration should the dependency use?

  1. implementation
  2. api
  3. androidTestImplementation
  4. testImplementation Correct answer.

Explanation

testImplementation adds the dependency to the local unit test compile and runtime classpath only. It is not packaged into the app or exposed to other modules. androidTestImplementation is for instrumented tests that run on a device.

Question 40App Development

A developer must ensure a network call in an iOS app is cancelled when the user leaves the screen. Which approach ties the request lifetime to the view controller?

  1. Relying on the request to time out eventually.
  2. Storing the URLSessionTask and calling cancel in deinit or when the view disappears. Correct answer.
  3. Using a synchronous data task on the main thread.
  4. Starting the request and ignoring the returned task handle.

Explanation

Keeping a reference to the URLSessionTask lets the code call cancel when the owning object is torn down, freeing resources and preventing late callbacks. Ignoring the handle leaves the request running and may update a stale UI. Relying on timeouts wastes bandwidth and delays cleanup.

Question 41App Development

In Flutter, an app needs to read a value from platform-specific code asynchronously. Which channel type is appropriate for request-response calls between Dart and the host platform?

  1. MethodChannel for invoking a method and awaiting a single reply. Correct answer.
  2. EventChannel for streaming sensor data continuously.
  3. PlatformViewLink for embedding native views.
  4. BasicMessageChannel used only for binary blobs.

Explanation

MethodChannel supports invoking a named method on the platform side and awaiting a single asynchronous result. It fits request-response interactions such as fetching a device identifier. EventChannel is for streams of events rather than one reply.

Question 42App Development

A team notices that an Android app's startup is slow because a heavy library initializes in Application.onCreate. Which change best reduces time to first frame?

  1. Move the initialization to a background thread or defer it until first use. Correct answer.
  2. Add more activities to the launcher intent filter.
  3. Increase the app's heap size in the manifest.
  4. Enable multidex and keep the initialization in onCreate.

Explanation

Work in Application.onCreate runs before the first frame, so deferring or moving heavy initialization off the critical path shortens startup. Libraries can be initialized lazily on first access or via a startup library that orders tasks. Heap size and multidex do not address the blocking initialization itself.

Question 43App Development

A SwiftUI view needs to run an asynchronous load when it first appears and cancel it when it disappears. Which modifier is designed for this lifecycle?

  1. The onChange modifier without a task.
  2. onAppear with an unmanaged Task that is never cancelled.
  3. The task(priority:) modifier, which cancels its task when the view disappears. Correct answer.
  4. A Combine sink stored in a local variable.

Explanation

The task modifier starts an async task bound to the view's lifetime and cancels it automatically when the view disappears. This avoids orphaned work and updates to a view that is no longer present. Manual Task creation in onAppear requires explicit cancellation handling.

Question 44App Development

An app must render a large, complex list on Android with smooth scrolling. Which Compose practice most directly avoids unnecessary recomposition of unchanged rows?

  1. Using stable, immutable data classes and remembering lambdas so row parameters compare equal. Correct answer.
  2. Calling recomposition manually on each scroll event.
  3. Wrapping the list in a Column with verticalScroll.
  4. Passing a newly created lambda and list instance to every row on each recomposition.

Explanation

Compose skips recomposition when parameters are equal and stable, so immutable data classes and remembered lambdas help rows be skipped. Creating new lambdas or lists each pass defeats equality checks and forces recomposition. Lazy lists also avoid composing offscreen rows.

Question 45App Development

A development team wants to catch regressions in a REST client's JSON parsing across releases. Which testing approach most directly validates that real server payloads still decode into the app's models?

  1. Increasing code coverage thresholds without new tests.
  2. Snapshot tests of the UI colors.
  3. Manual exploratory testing on one device.
  4. Contract tests that decode recorded or schema-validated payloads into the models. Correct answer.

Explanation

Contract tests feed representative payloads into the decoding layer and assert the resulting models, catching schema drift early. Recording real responses keeps fixtures aligned with the server. UI snapshots and coverage thresholds do not verify parsing correctness.

Question 46App Development

A Kotlin developer needs a class whose instances compare by value and can be used safely as keys in a set. Which declaration provides equals, hashCode, and copy out of the box?

  1. An abstract class.
  2. A regular class with mutable properties.
  3. An object declaration.
  4. A data class. Correct answer.

Explanation

A data class generates equals, hashCode, toString, copy, and component functions from its primary constructor properties. Value-based equality makes instances behave correctly in sets and maps. Regular classes inherit identity-based equality unless the developer implements it.

Question 47App Development

An Android app must show a permission rationale only after the user has denied a permission once. Which API result should the code check to distinguish a first denial from a permanent denial?

  1. The result of getPackageInfo with GET_PERMISSIONS.
  2. shouldShowRequestPermissionRationale after a denial, combined with whether the permission was granted. Correct answer.
  3. checkSelfPermission before requesting the permission.
  4. The app's targetSdkVersion value.

Explanation

After a denial, shouldShowRequestPermissionRationale returns true while the system still allows prompting with rationale. If it returns false after a denial, the user likely selected don't ask again, so the app should direct them to settings. checkSelfPermission only reports current grant state.

Question 48App Development

A Flutter app uses a global singleton service accessed directly inside many widgets. A test needs to substitute a fake implementation. Which refactor best enables injection without changing widget behavior?

  1. Make the singleton's constructor private and keep direct access.
  2. Replace the singleton with a top-level final variable.
  3. Add more static methods to the singleton.
  4. Expose the service through an InheritedWidget or provider and inject a fake in the test's widget tree. Correct answer.

Explanation

Providing the service through the widget tree, for example with an InheritedWidget or a provider package, lets tests wrap widgets with a fake implementation. This removes hidden global dependencies and keeps production behavior unchanged. Static access and top-level finals are equally hard to substitute.

Question 49App Development

An iOS app uses a background URLSession to upload files while the app is suspended. Which delegate responsibility is essential to handle completed transfers after relaunch?

  1. Implementing the session delegate in the app delegate or a dedicated object that the system can recreate. Correct answer.
  2. Using a foreground session with a long timeout.
  3. Relying on the completion handler of the original data task.
  4. Disabling app state restoration to avoid conflicts.

Explanation

Background sessions deliver events to the app delegate or a dedicated delegate that the system reconnects after relaunch, so transfers can finish while the app is not running. The original completion handler is not retained across process termination. Foreground sessions cannot continue after suspension.

Question 50App Development

A team profiles an Android app and finds frequent garbage collection during list scrolling. Which change most directly reduces allocation churn in the scroll path?

  1. Increasing the image resolution of row thumbnails.
  2. Adding logging statements inside the scroll listener.
  3. Creating new formatter and string objects inside onBindViewHolder for each row.
  4. Reusing view holders and precomputing formatted strings or using cached objects. Correct answer.

Explanation

Reusing view holders and caching formatted values removes per-frame allocations that pressure the heap and trigger GC. Allocation churn in onBindViewHolder is a common cause of jank during scrolling. Higher-resolution images and added logging increase work rather than reduce it.