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.
3, then 1, then 3.3333333333333335
No citable source has been recorded for this record. Treat it as practice material, not as fact.
Integer division discards the fraction, % gives the remainder, and making one operand a double makes the division floating point.
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: int a = 7; int b = 2; System.out.println(a / b); System.out.println((double) a / b);
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