JAVA Constructors and Methods What is Math.floor(3.6)? 4 3 4.0 3.0 4 3 4.0 3.0 ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods Given the following piece of code:class Person{ public int number;}public class Test{ public void doIt(int i , Person p){ i = 5; p.number = 8; } public static void main(String args[]){ int x = 0; Person p = new Person(); new Test().doIt(x, p); System.out.println(x + " " + p.number); }}What is the result? 5 8 0 0 5 0 0 8 5 8 0 0 5 0 0 8 ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The variables declared in a class for the use of all methods of the class are called objects reference variables instance variables None of these objects reference variables instance variables None of these ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What will be the result of compiling and running the given code?class A{ int b=10; private A(){ this.b=7; } int f(){ return b; }}class B extends A{ int b;}public class Test{ public static void main(String[] args){ A a = new B(); System.out.println(a.f()); }} Prints 0 Prints 10 None of these Compilation Fails Prints 7 Prints 0 Prints 10 None of these Compilation Fails Prints 7 ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What is the output for the below code ?1. public class A{2. int add(int i, int j){3. return i+j;4. }5. }6. public class B extends A{7. public static void main(String argv[]){8. short s = 9;9. System.out.println(add(s,6));10. }11.} Compile fail due to error on line no 8 None of these Compile fail due to error on line no 9 15 Compile fail due to error on line no 2 Compile fail due to error on line no 8 None of these Compile fail due to error on line no 9 15 Compile fail due to error on line no 2 ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods In which area of memory, the system stores parameters and local variables whenever a method is invoked? Array Stack Heap Storage Area Array Stack Heap Storage Area ANSWER DOWNLOAD EXAMIANS APP