What is the significance of the keyword static in a method declaration?
User-Defined Methods
Original Khojo Papers practice question — not from a past board paper.
boolean isPal(int n) { int r = 0, t = n; while (t > 0) { r = r * 10 + t % 10; t /= 10; } return r == n; }
No citable source has been recorded for this record. Treat it as practice material, not as fact.
The original value must be kept in n, which is why a copy is made in t.
From the same topic and chapter, at a similar level.
What is the significance of the keyword static in a method declaration?
User-Defined Methods
Explain the difference between a pure and an impure method.
User-Defined Methods
Distinguish between a formal parameter and an actual parameter, and explain call by value.
User-Defined Methods
What is method overloading? State the conditions under which two methods are said to be overloaded.
User-Defined Methods
Explain the ternary operator in Java and rewrite "if (a > b) max = a; else max = b;" using it.
Operators and Expressions in Java
What is the output of: String s = "Examination"; System.out.println(s.length() + " " + s.substring(0, 4) + " " + s.toUpperCase().charAt(2));
String Handling