Distinguish between implicit and explicit type conversion in Java, with an example of each.
Values and Data Types
Original Khojo Papers practice question — not from a past board paper.
The first prints 3 and the second prints 3.5.
No citable source has been recorded for this record. Treat it as practice material, not as fact.
Division of two integers in Java gives an integer quotient with the fractional part discarded; casting one operand to double makes the division a floating-point one.
From the same topic and chapter, at a similar level.
Distinguish between implicit and explicit type conversion in Java, with an example of each.
Values and Data Types
Distinguish between a primitive type and a reference type in Java, with two examples of each.
Values and Data Types
What is the output of: System.out.println(10 / 3); System.out.println(10 % 3); System.out.println(10.0 / 3);
Values and Data Types
Name the eight primitive data types of Java and state the size of each.
Values and Data Types
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