GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

What is the value of Math.pow(3, 2)?

What is the value of Math.pow(3, 2)?

Read Details

Select the statement that reveals the logic error in the fol…

Select the statement that reveals the logic error in the following method. public static double minimum(double[] data) { double smallest = 0.0; for (int i = 0; i < data.length; i++) { if (data[i] < smallest) { smallest = data[i]; } } return smallest; }

Read Details

 What is the output of the statements below? int a = 10; if…

 What is the output of the statements below? int a = 10; if (a > 5) { System.out.print (“One”); } else { System.out.print (“Two”); } System.out.print (“Three”);

Read Details

What is the output of the following code snippet? String str…

What is the output of the following code snippet? String str1 = “her”; String str2 = “cart”; if (str1.compareTo(str2) < 0) { System.out.print(str2); } else { System.out.print(str1); }

Read Details

Which of the statements about hand-tracing is true?

Which of the statements about hand-tracing is true?

Read Details

What is the output of the following code snippet? int x = 25…

What is the output of the following code snippet? int x = 25; if (x < 100) { x = x + 5; } if (x < 500) { x = x - 2; } if (x > 10) { x++; } else { x–; } System.out.println(x);

Read Details

Consider the following code snippet. Which statement should…

Consider the following code snippet. Which statement should be used to fill in the empty line so that the output will be [32, 54, 67.5, 29, 35]? public static void main(String[] args) { double data[] = {32, 54, 67.5, 29, 35}; ______________ System.out.println(str); }

Read Details

The black boxes from which a program is manufactured are cal…

The black boxes from which a program is manufactured are called ___.

Read Details

What is the output of the following code snippet? int i = 1;…

What is the output of the following code snippet? int i = 1; while (i < 20) { System.out.print(i + " "); i = i + 2; if (i == 15) { i = 19; } }

Read Details

Assume the array of integers values has been created and pro…

Assume the array of integers values has been created and process is a method that has a single integer parameter. Which of the following is equivalent to the loop below? for (int val: values) { process(val); }

Read Details

Posts pagination

Newer posts 1 … 73,921 73,922 73,923 73,924 73,925 … 81,628 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top