What changes do you need to make in the following code snipp… What changes do you need to make in the following code snippet to display “Let us learn Java” exactly 10 times? int i = 0; while (i Read Details
What are the values of i and j after the following code snip… What are the values of i and j after the following code snippet is run? int i = 10; int j = 20; int count = 0; while (count < 5) { i = 2*i; i = i + 1; j = j - 1; count++; } System.out.println("i = " + i + ", j = " + j); Read Details
Suppose you wish to write a method that returns the sum of t… Suppose you wish to write a method that returns the sum of the elements in partially filled array. Which is the best choice for a method header? Read Details
Which of the following loops executes 8 times? Which of the following loops executes 8 times? Read Details
Which of the following statements is true about the if state… Which of the following statements is true about the if statement? Read Details
What is the output of the code snippet given below? String s… What is the output of the code snippet given below? String s = “abcde”; int i = 1; while (i < 5) { System.out.print(s.substring(i, i + 1)); i++; } Read Details
When you declare a method, you also need to provide the meth… When you declare a method, you also need to provide the method ____, which consists of statements that are executed when the method is called. Read Details
Which one of the following refers to a number constant that… Which one of the following refers to a number constant that appears in code without explanation? Read Details
Which part of a class implementation contains the instructio… Which part of a class implementation contains the instructions to initialize an object’s instance variables? Read Details
Consider the following code snippet: String[] data = { “123”… Consider the following code snippet: String[] data = { “123”, “ghi”, “jkl”, “def”, “%&*” }; Which statement sorts the data array in ascending order? Read Details