GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Which pattern is produced by the following code?for (int i =…

Which pattern is produced by the following code?for (int i = 1; i = 1; j–) System.out.print(j

Read Details

Given the following method, what is the output of the call n…

Given the following method, what is the output of the call nPrint(‘a’, 4)?static void nPrint(String message, int n) { while (n > 0) { System.out.print(message); n–; }}

Read Details

What is sum after the following loop terminates?int sum = 0;…

What is sum after the following loop terminates?int sum = 0;int item = 0;do { item++; if (sum >= 4) continue; sum += item;}while (item < 5);

Read Details

Suppose s is a string with the value “java”. What will be as…

Suppose s is a string with the value “java”. What will be assigned to x if you execute the following code?char x = s.charAt(4);

Read Details

How many times is the println statement executed?for (int i…

How many times is the println statement executed?for (int i = 0; i < 10; i++) for (int j = 0; j < i; j++) System.out.println(i * j)

Read Details

The statement System.out.printf(“%3.1f”, 1234.56) outputs __…

The statement System.out.printf(“%3.1f”, 1234.56) outputs ________.

Read Details

In the following code, what is the output for list2?public c…

In the following code, what is the output for list2?public class Test { public static void main(String[] args) { int[] list1 = {1, 2, 3}; int[] list2 = {1, 2, 3}; list2 = list1; list1[0] = 0; list1[1] = 1; list2[2] = 2; for (int i = 0; i < list2.length; i++) System.out.print(list2[i] + " "); }}

Read Details

The signature of a method consists of ________.

The signature of a method consists of ________.

Read Details

How many times will the following code print “Welcome to Jav…

How many times will the following code print “Welcome to Java”?int count = 0;while (count < 10) { System.out.println("Welcome to Java"); count++;}

Read Details

What calculation is used to determine blood pressure in chil…

What calculation is used to determine blood pressure in children ages 1-10 years (lower limit): 

Read Details

Posts pagination

Newer posts 1 … 45,617 45,618 45,619 45,620 45,621 … 83,018 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top