GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Command-line arguments are separated using spaces.

Command-line arguments are separated using spaces.

Read Details

What is the output of the following code? public class Test…

What is the output of the following code? public class Test {  public static void main(String[] args) {    try {      int[] arr = null;      int b = arr.length;    } catch (ArrayIndexOutOfBoundsException e) {      System.out.print(“oops…”);    } catch (NullPointerException e) {      System.out.print(“ok…”);    } finally {      System.out.println(“done”);    }  }} [BLANK-1]

Read Details

What is the output of the following Java program statement (…

What is the output of the following Java program statement (be exact and only include characters that will be displayed)? System.out.println(“\””+”\\\”Java”); [BLANK-1]

Read Details

Evaluate the following postfix expression: 7,2,*,9,3,/,4,-,*…

Evaluate the following postfix expression: 7,2,*,9,3,/,4,-,* [BLANK-1]

Read Details

What will be stored in the variable x after the loop ends? i…

What will be stored in the variable x after the loop ends? int x=2;for (int i=0; i

Read Details

Given the following array declaration:int[] a = new int[6];W…

Given the following array declaration:int[] a = new int[6];What is the index of the last element in the array?

Read Details

The following is a Java method that is part of a Linked List…

The following is a Java method that is part of a Linked List based Stack implementation:void foo() {  if (front==null) return;  LinkedNode c = front;  int a = count/2;  for (int i=1; i

Read Details

What is the output of the following program?public class Tes…

What is the output of the following program?public class Test {  public static void main(String[] args) {    String s = “edcba”;    System.out.println(foo(s));  }  public static String foo(String s) {    if (s==null || s.length()==1) return s;    else {      return s.charAt(s.length()-1) + foo(s.substring(0,s.length()-1));    }  }} [BLANK-1]

Read Details

What is the running time of the following method in terms of…

What is the running time of the following method in terms of its input? void foo(int N) {    int k = 0;    int j = 10;    int sum=0;    while (k

Read Details

What is an example of an object?

What is an example of an object?

Read Details

Posts pagination

Newer posts 1 … 25,129 25,130 25,131 25,132 25,133 … 92,544 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top