statement to invoke the method m1? public static void m1(double x, double y){/*.........*/} int result = m1 (1.0, 2.0); 4 m1 (1.0, 2.0); System.out.println(m1 (1.0, 2.0)); double result = m1 (1.0, 2.0); O
Given the following two method signatures below. Which of the following invocation will cause an error? m1(int x, int y) m1( double x, int y) no errors in invocation m1 (3.4) m1 (3.0.4) m1 (3.4.0). O O
When you pass an array to a method, the method receives a copy of the array the length of the array a copy of the first element the reference of the array O
What is the value of array2 according to this program? int[] array = {1, 2, 3, 4); int[] array2 = new int [array.length]; for(int i =0, j = array2.length; i < array.length; i++, j--X array2 [j-1] = array ; O O } 0000 1234 4321 0123
Variable declaration leads to Variable assignment. O Variable initialization. Variable identifying. Memory allocation. O
Java bytecode can be executable on any computer if there is NetBeans. Compiler. JVM. Processor.
Which of the following statements is NOT correct about the for loop structure? for (initial-action; loop-continuation-condition; action-after-each-iteration) The initial-action in a for loop can be a list of expressions The initial-action in a for loop can be empty The action-after-each-iteration in a for loop can be a list of statements The loop-continuation-condition can be a list of conditions cakepprcourse_assessment ↳ Moving to the next question prevents changes to this answer. Question 9 What would be the starting value of i and j? boolean isPalindrome = true; for(int i=??, j = ??;i<=j;i++.j--) ( if (word.charAt(i) != word.charAt(j)) ( System.out.println("is not a palindrome "); isPalindrome = false; } O } i=word.length()-1.j=0 i=0.j=word.length()-1 i=0.j=word length() i=word.length().j=0
Every Java program must contain O a Scanner object a main method O a selective statement O a variable
A block begins with ........and ends with. O an opening parentheses (, a closing parentheses ) O an opening single quotation', a closing single quotation' "1 an opening double quotation ", a closing double quotation an opening brace{, a closing brace } QUESTION 10
Which of the following is a correct Which of the following is a correct statement to invoke the method m1? public static void m1(double x, double y){/*.....
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am