What is the this keyword and when is it needed?
Encapsulation and Class as a User-Defined Type
Original Khojo Papers practice question — not from a past board paper.
Zero for int, 0.0 for double, false for boolean and null for String.
No citable source has been recorded for this record. Treat it as practice material, not as fact.
A local variable, by contrast, has no default and must be assigned before it is used.
From the same topic and chapter, at a similar level.
What is the this keyword and when is it needed?
Encapsulation and Class as a User-Defined Type
Why are the data members of a class usually declared private?
Encapsulation and Class as a User-Defined Type
Name the access specifiers of Java and state the visibility each gives.
Encapsulation and Class as a User-Defined Type
Distinguish between an instance variable and a class variable.
Encapsulation and Class as a User-Defined Type
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