GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

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

Which one of the following statements displays the output as…

Which one of the following statements displays the output as -1.23e+02?

Read Details

Which error type does the “off-by-one” error belong to?

Which error type does the “off-by-one” error belong to?

Read Details

Assuming that a user enters 15 as input, what is the output…

Assuming that a user enters 15 as input, what is the output of the following code snippet? Scanner in = new Scanner(System.in); System.out.print(“Please enter a number: “); int number = in.nextInt(); if (number > 20) { System.out.println(“The number is LARGE!”); } else { System.out.println(“The number is SMALL!”); }

Read Details

Posts pagination

Newer posts 1 … 51,079 51,080 51,081 51,082 51,083 … 58,789 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top