GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

What is displayed on the console when running the following…

What is displayed on the console when running the following program?public class Test { public static void main (String[] args) { try { System.out.println(“Welcome to Java”); return; } finally { System.out.println(“The finally clause is executed”); } }}

Read Details

Analyze the following code:public class Test { int x; public…

Analyze the following code:public class Test { int x; public Test(String t) { System.out.println(“Test”); } public static void main(String[] args) { Test test = new Test(); System.out.println(test.x); }}

Read Details

Which method can be used to create an input object for file…

Which method can be used to create an input object for file temp.txt?

Read Details

Which class contains the method for checking whether a file…

Which class contains the method for checking whether a file exists?

Read Details

Assume Cylinder is a subtype of Circle. Analyze the followin…

Assume Cylinder is a subtype of Circle. Analyze the following code:Circle c = new Circle (5);Cylinder c = cy;

Read Details

What is displayed by the following code? System.out.print(“H…

What is displayed by the following code? System.out.print(“Hi, ABC, good”.matches(“ABC “) + ” “); System.out.println(“Hi, ABC, good”.matches(“.*ABC.*”));

Read Details

Which of the following is the correct statement to return a…

Which of the following is the correct statement to return a string from an array a of characters?

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) { Object o1 = new Object(); Object o2 = new Object(); System.out.print((o1 == o2) + ” ” + (o1.equals(o2))); }}

Read Details

What is displayed by the following code? System.out.print(“A…

What is displayed by the following code? System.out.print(“A,B;C”.replaceAll(“,;”, “#”) + ” “); System.out.println(“A,B;C”.replaceAll(“[,;]”, “#”));

Read Details

What is displayed by the following code? public static void…

What is displayed by the following code? public static void main(String[] args) { String[] tokens = “Welcome to Java”.split(“o”); for (int i = 0; i < tokens.length; i++) { System.out.print(tokens[i] + " "); } }

Read Details

Posts pagination

Newer posts 1 … 33,953 33,954 33,955 33,956 33,957 … 81,391 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top