What is the output of this program?
class Output { public static void main(String args[]) { double x = 3.14; int y = (int) Math.floor(x); System.out.print(y); } }
What is the output of this program?
class Output { public static void main(String args[]) { double x = 3.14; int y = (int) Math.ceil(x); System.out.print(y); } }
What is the output of this program?
class Output { public static void main(String args[]) { double x = 3.14; int y = (int) Math.abs(x); System.out.print(y); } }
What is the output of this program?
class A { int x; int y; void display() { System.out.print(x + " " + y); } } class Output { public static void main(String args[]) { A obj1 = new A(); A obj2 = new A(); obj1.x = 1; obj1.y = 2; obj2 = obj1.clone(); obj1.display(); obj2.display(); } }
Which of function return absolute value of a variable?