GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

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

What is the output of the statements below? int a = 10; int b = 20; int count = 0; if (a > 5) if (b > 5) { count ++; } else count = 7; System.out.print (count);

Read Details

What will be printed by the statements below? int[] values =…

What will be printed by the statements below? int[] values = { 10, 24, 3, 64}; int position = 0; for (int i = 1; i < values.length; i++) { if (values[i] > values[position]) { position = i; } } System.out.print (position);

Read Details

When an array myArray is only partially filled, how can the…

When an array myArray is only partially filled, how can the programmer keep track of the current number of elements?

Read Details

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

What is the output of the following code snippet? int var1 = 10; int var2 = 2; int var3 = 20; var3 = var3 / (var1 % var2); System.out.println(var3);

Read Details

What is the meaning of x = 0; in Java?

What is the meaning of x = 0; in Java?

Read Details

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

What is the output of the statements below? int a = 10; int b = 20; int count = 0; if (a > 5) { count ++; if (b > 5) { count ++; } } if (a > 10) { count ++; if (b > 10) { count ++; } } System.out.print (count);

Read Details

Assume the method createSomething has been defined as follow…

Assume the method createSomething has been defined as follows: public static int [] createSomething (int start, int size) { int [] result = new int[size]; for (int i = 0; i < result.length; i++) { result[i] = start; start++; } return result; } What is printed by the statement below? System.out.print(Arrays.toString(createSomething(4, 3)));

Read Details

Which one of the following statements displays the output as…

Which one of the following statements displays the output as 54321.00?

Read Details

When hand tracing, drawing a line through the value stored i…

When hand tracing, drawing a line through the value stored in a variable means that the

Read Details

What is the value of the var variable at the end of the give…

What is the value of the var variable at the end of the given code snippet? int var = 30; var = var + 2 / var; var++;

Read Details

Posts pagination

Newer posts 1 … 62,050 62,051 62,052 62,053 62,054 … 69,760 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top