Method which reverses a given number is:

ICSE Class 10 Computer Applications PYQ · 2024 Paper · Section A

1(xiv)1 Mark · 2024 · Section A · 2024 Paper

Method which reverses a given number is:

Show SolutionHide Solution↓

Pure method

Reason — A pure method in Java is a method that:

  1. Returns a value based only on its input arguments.
  2. Does not modify any external variables or system state.
  3. Does not change any class fields or input values.

In the context of reversing a number, a pure method accepts the number as input and returns its reversed form without altering any external state.

← Previous questionNext question →

Browse the free Computer Applications sample bank