Knowee
Questions
Features
Study Tools

Select the correct answerOutput of following Java program?class Test{  public static void main (String[] args)   {    int arr1[] = {88, 3, 99};    int arr2[] = {1, 2, 3};    if (arr1.equals(arr2))      System.out.println("Same");    else      System.out.println("Not same");  }}OptionsCompiler errorNot sameSameRuntime error

Question

Select the correct answerOutput of following Java program?class Test{  public static void main (String[] args)   {    int arr1[] = {88, 3, 99};    int arr2[] = {1, 2, 3};    if (arr1.equals(arr2))      System.out.println("Same");    else      System.out.println("Not same");  }}OptionsCompiler errorNot sameSameRuntime error

🧐 Not the exact question you are looking for?Go ask a question

Solution

Not same

Similar Questions

Select the correct answerWhat will be the output of the following Java program?class java   {    public static void main(String args[])    {      int var1 = 3;       int var2 = 8;      if ((var2 = 2) == var1)        System.out.print(var2);      else         System.out.print(++var2);    }   }Options4213

Find the output of the below Java program?public class Test {  public static void main(String[] args) {     Test t1 = new Test();     Test t2 = t1;     System.out.println(t1.equals(t2));  }}A) trueB) falseC) nullD) error

Select the correct answerPredict the output of following Java program.?class CT {      public static void main(String args[]) {               int a;               System.out.println(a);     }   } Optionscompiler errorgarbage value0runtime error

Select the correct answerWhat will be the output of the following Java program? class CT {  public static void main(String args[]) {     try {      int X, Y;      Y = 0;      X = 5 / Y;      System.out.print("A");    }    catch(ArithmeticException e) {  System.out.print("B");    }    finally {     System.out.print("C");    }  } }OptionsBAACBC

elect the correct answerPredict the output ?class Test {  public static void main(String args[]) {   int arr[] = new int[2];     System.out.println(arr[0]);   System.out.println(arr[1]);  }}OptionsCompiler Errorgarbage valuegarbage value00Exception

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.