Company: SDET_12oct
Difficulty: medium
Consider the code snippet given below: Which of the following exception messages will you get if you execute this Java code? class DoSelectLab { public static void main(String[] args) { int i = 10; System.out.println(10/0); } } / by zero ArithmeticException: / by zero NullPointerException ArrayIndexOutOfBoundsException What are the rules for creating a Java Constructor? (Select all that apply) Constructor name must be the same as its class name A Constructor must have no explicit return type A Java constructor cannot be abstract, static, final, or synchronized A constructor must always be public Given an array of integers: a = {4, 4, 0, 1, 1}. An operation is defined as a 'right circular shift by 1 position'. Perform operation n times (where n is a non-negative integer), and find the smallest possible value of a[0] + a[2] after n shifts. What is the value of n? 1 2 3 4 Consider the following Java code snippet. What is the output of the program? class Sample extends Thread { Thread t1,