Distinguish a copied value from an object reached through it.
Review primitive and reference arguments, overloads, overriding, constructor fields and lambda capture restrictions.
The count records matching keys among these six selected Java 25 tasks. It is not a developer level, percentile, hiring cutoff or qualification. Every explanation and this full revision guide remain available at every count.
Six decisions across calls and object state
This section moves from small expressions to relationships between a caller, a parameter and an object. It asks what changing a primitive parameter can affect, what an array reference lets a method update, which overload is selected, which overridden method runs, where a constructor stores its argument and whether a lambda capture compiles. The questions use complete independent Java 25 programs. No question asks you to infer a class definition that has been omitted.
Follow a copied reference to one mutable array
Consider a new unscored helper setFirst(int[] a) that assigns a[0]=12. A caller creates int[] values={5}, invokes setFirst(values) and prints values[0]. The method receives a copy of a reference to the same array, so the printed value becomes 12. If the helper instead assigns a=new int[]{12}, it rebinds only its parameter and the caller’s original array still contains five. Both examples use pass-by-value; what differs is mutation versus reassignment.
Separate overload selection from overriding
An overloaded call is resolved using the applicable signatures and compile-time types of the expressions supplied. In the task, an Object-typed argument selects the Object overload even when it refers to a String. An overridden instance method with an already selected signature is a different question: the child implementation can run through a parent-typed reference. Trace the stage being asked about before applying a rule; the simple witnesses do not cover every interaction of generics, varargs and overload resolution.
Name the variable an assignment changes
A constructor parameter can share a field’s name. The expression this.n identifies the new object’s field; an unqualified n can name the parameter in that scope. Read the left-hand side and right-hand side separately before predicting stored state. Likewise, a captured local variable is not the same as a field reached through an object. The supplied lambda task reassigns an initially assigned local, so that local is not effectively final and the program is rejected before execution.
Draw variables and objects as separate boxes
For a disposable exercise, draw one box for each local variable and another for each created object or array. Write reference values as arrows, then mark whether a statement changes an arrow or changes an element in the target object. Add a method parameter box at each call. Predict the output before compiling with the specified Java edition. This drawing is an aid to following the selected program, not a claim about physical memory addresses or every optimisation a virtual machine can perform.
Find the mistaken relationship behind the count
Compare your option with the worked explanation and ask which relationship you treated differently. Did you assume that changing a copied int changes the caller, that copying a reference copies its whole object, or that runtime object type selects every overload? A wrong choice names a review opportunity in that supplied example. A correct choice does not show that you could design a maintainable API, review an unfamiliar service or communicate a design decision to a team.
Keep compile checks separate from ability claims
The original bank contains both successful programs and explicitly expected compilation failures, all checked with Temurin JDK 25.0.2. A compile error is one possible keyed outcome, not a broken practice page. This knowledge set has no calibrated developer levels, Oracle certification or hiring recommendation. Full explanations and all four public guides are free at every count. English code stays identical across interfaces; translation of the surrounding instructions does not establish psychometric equivalence between languages.