JAVA Constructors and Methods Which of the modifier can't be used for constructors? static private public protected static private public protected ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods Which of the following options is the best for generating random integer 0 or 1? (int)Math.random() (int)(Math.random() + 0.2) (int)Math.random() + 1 (int)(Math.random() + 0.5) (int)Math.random() (int)(Math.random() + 0.2) (int)Math.random() + 1 (int)(Math.random() + 0.5) ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods The implicit return type of a constructor is None of these A class object in which it is defined. void There is no return type. None of these A class object in which it is defined. void There is no return type. ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods What is the output for the below code?public class Test{ public static void printValue(int i, int j, int k){ System.out.println("int"); } public static void printValue(byte...b){ System.out.println("long"); } public static void main(String... args){ byte b = 9; printValue(b,b,b); }} Compilation fails Compilation clean but throws RuntimeException None of these long int Compilation fails Compilation clean but throws RuntimeException None of these long int 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 instance variables None of these reference variables objects instance variables None of these reference variables ANSWER DOWNLOAD EXAMIANS APP
JAVA Constructors and Methods Which of these is a legal definition of a method named examveda assuming it throws IOException, and returns void. Also assume that the method does not take any arguments. Select the one correct answer. void examians(void) throws IOException{} void examians() throws IOException{} examians() throws IOException{} void examians() throw IOException{} void examians() {} throws IOException void examians(void) throws IOException{} void examians() throws IOException{} examians() throws IOException{} void examians() throw IOException{} void examians() {} throws IOException ANSWER DOWNLOAD EXAMIANS APP