GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Which of the following options could be used as a terminatin…

Which of the following options could be used as a terminating condition for a recursive method that finds the middle character of a String with any number of characters? I  the length of the String is 1 II  first and last String characters match III the String is not empty

Read Details

Insert the missing code in the following code fragment. This…

Insert the missing code in the following code fragment. This fragment is intended to read an input file named dataIn.txt. public static void main(String[] args) __________________ { String inputFileName = “dataIn.txt”; File inputFile = new File(inputFileName); Scanner in = new Scanner(inputFile); . . . }

Read Details

Consider the sort method shown below for selection sort: pub…

Consider the sort method shown below for selection sort: public static void sort(int[] a) { for (int i = 0; i < a.length – 1; i++) { int minPos = minimumPosition(i); swap(minPos, i); } } Suppose we modify the loop condition to read i < a.length. What would be the result?

Read Details

Which of the following statements about exception reporting…

Which of the following statements about exception reporting is true?

Read Details

Which of the following statements about interfaces is true?

Which of the following statements about interfaces is true?

Read Details

In big-Oh notation, suppose an algorithm requires an order o…

In big-Oh notation, suppose an algorithm requires an order of n3 element visits. How does doubling the number of elements affect the number of visits?

Read Details

Which of the following is not a visual component?

Which of the following is not a visual component?

Read Details

Which of the following statements about exception reporting…

Which of the following statements about exception reporting is true?

Read Details

Which GUI element allows text entry from the program user?

Which GUI element allows text entry from the program user?

Read Details

Complete the code for the calcPower recursive method shown b…

Complete the code for the calcPower recursive method shown below, which is intended to raise the base number passed into the method to the exponent power passed into the method: public static int calcPower(int baseNum, int exponent) { int answer = 0; ________________________ { answer = 1; } else { answer = baseNum * calcPower (baseNum, exponent – 1); } return answer; }

Read Details

Posts pagination

Newer posts 1 … 59,373 59,374 59,375 59,376 59,377 … 64,641 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top