GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Given class Animal { void speak() { System.out.print(“…”);…

Given class Animal { void speak() { System.out.print(“…”); } } and class Dog extends Animal { void speak() { System.out.print(“Woof”); } }, what does Animal a = new Dog(); a.speak(); print?

Read Details

What is printed? class A { int x = 1; } then A a = new A();…

What is printed? class A { int x = 1; } then A a = new A(); A b = a; b.x = 5; System.out.println(a.x);

Read Details

Which operator is the logical AND?

Which operator is the logical AND?

Read Details

How does a subclass constructor call its parent constructor?

How does a subclass constructor call its parent constructor?

Read Details

Which describes a constructor?

Which describes a constructor?

Read Details

What is the value of r? boolean r = !(5 > 3);

What is the value of r? boolean r = !(5 > 3);

Read Details

When does Java supply a default no-argument constructor?

When does Java supply a default no-argument constructor?

Read Details

Case labels in a switch must be:

Case labels in a switch must be:

Read Details

What is printed? String s = “Java”; s.concat(“Fun”); System….

What is printed? String s = “Java”; s.concat(“Fun”); System.out.println(s);

Read Details

Where may the default label appear in a classic switch state…

Where may the default label appear in a classic switch statement?

Read Details

Posts pagination

Newer posts 1 … 10 11 12 13 14 … 100,538 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top