JAVA Constructors and Methods
Which of the following options is the best for generating random integer 0 or 1?

(int)(Math.random() + 0.5)
(int)(Math.random() + 0.2)
(int)Math.random()
(int)Math.random() + 1

ANSWER DOWNLOAD EXAMIANS APP

JAVA Constructors and Methods
class MyClass{      MyClass(){            System.out.print("one");      }      public void myMethod(){            this();            System.out.print("two");      }} public class TestClass{      public static void main(String args[]){            MyClass obj = new MyClass();            obj.myMethod();      }}

None of these
Compilation Error
one one two
two one one
one Exception

ANSWER DOWNLOAD EXAMIANS APP