11
Loading subject content…
Loading subject content…
Loading practice questions…
What is the output of the following program?
public class Main {
public static void main(String[] args) {
System.out.println(Math.max(3, 9) + Math.min(3, 9));
}
}What is the output of the following program?
public class Main {
public static void main(String[] args) {
System.out.println(Math.ceil(4.1) + " " + Math.floor(4.9));
}
}What is the output of the following program?
public class Main {
public static void main(String[] args) {
Object o = "text";
System.out.println(o instanceof String s ? s.length() : -1);
}
}What is the output of the following program?
public class Main {
public static void main(String[] args) {
System.out.println(Math.abs(-7.5));
}
}