GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

How many times does the code snippet given below display “Lo…

How many times does the code snippet given below display “Loop Execution”? int i = 1; while (i != 10) { System.out.println(“Loop Execution”); i++; }

Read Details

What term is used to refer to a sequence of characters enclo…

What term is used to refer to a sequence of characters enclosed in quotation marks?

Read Details

Given the following code snippet: public static int newCalc(…

Given the following code snippet: public static int newCalc(int n) { if (n < 0) { return -1; } else if (n < 10) { return n; } else { return (1 + newCalc(n / 10)); } } What value will be returned when this code is executed with a call to newCalc(5)?

Read Details

What is the result of the following code? for (double elemen…

What is the result of the following code? for (double element : values) { element = 0; }

Read Details

Which of the following classifications of method behavior pr…

Which of the following classifications of method behavior produces acceptable side effects?

Read Details

Which of the following does NOT describe a particular side e…

Which of the following does NOT describe a particular side effect related to standard output?

Read Details

Given the following code snippet: public static int newCalc(…

Given the following code snippet: public static int newCalc(int n) { if (n < 0) { return -1; } else if (n < 10) { return n; } else { return (1 + newCalc(n / 10)); } } What value will be returned when this code is executed with a call to newCalc(15)?

Read Details

Select an appropriate expression to complete the following m…

Select an appropriate expression to complete the following method, which is designed to visit the elements in theList and replace each occurrence of the string “hello” with the string “goodbye”. public static void helloGoodbye(LinkedList theList) { ListIterator iterator = theList.listIterator(); while (iterator.hasNext()) { if (iterator.next().equals(“hello”)) { _____________________________ } } }

Read Details

Which of the following types of methods are invoked on objec…

Which of the following types of methods are invoked on objects?

Read Details

Why can’t Java methods change parameters of primitive type?

Why can’t Java methods change parameters of primitive type?

Read Details

Posts navigation

Newer posts 1 … 44,983 44,984 44,985 44,986 44,987 … 52,687 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top