logo

Crowdly

Browser

Додати до Chrome

*Програмування на Jаvа

Шукаєте відповіді та рішення тестів для *Програмування на Jаvа? Перегляньте нашу велику колекцію перевірених відповідей для *Програмування на Jаvа в dl.nure.ua.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

Suppose we have a class named Rabbit. Which of the following statements are true? (Choose all that apply)

1: public class Rabbit {

2: public static void main(String[] args) {

3: Rabbit one = new Rabbit();

4: Rabbit two = new Rabbit();

5: Rabbit three = one;

6: one = null;

7: Rabbit four = one;

8: three = null;

9: two = null;

10: two = new Rabbit();

11: System.gc();

12: } }

100%
0%
0%
0%
100%
0%
Переглянути це питання

Which of the following statements are true? (Choose all that apply.)

100%
100%
0%
0%
100%
0%
Переглянути це питання

What is the result of the following program?

1: public abstract class Message {

2: public String recipient;

3: public abstract final void sendMessage();

4: public static void main(String[] args) {

5: Message m = new TextMessage();

6: m.recipient = "1234567890";

7: m.sendMessage();

8: }

9: static class TextMessage extends Message {

10: public final void sendMessage() {

11: System.out.println("Text message to " + recipient);

12: } } }

0%
0%
0%
0%
100%
0%
Переглянути це питання

Given the following class, which of the following calls print out Blue Jay? (Choose all that apply)

public class BirdDisplay {

 public static void main(String[] name) {

 System.out.println(name[1]);

} }

0%
0%
100%
0%
0%
0%
0%
Переглянути це питання

What is the result of the following code?

1: public class Hello<T> {

2: T t;

3: public Hello(T t) { this.t = t; }

4: public String toString() { return t.toString(); }

5: public static void main(String[] args) {

6: System.out.print(new Hello<String>("hi"));

7: System.out.print(new Hello("there"));

8: } }

100%
0%
0%
0%
0%
0%
Переглянути це питання

Which of the following return primitives? (Choose all that apply.)

100%
0%
0%
100%
100%
0%
Переглянути це питання

What is the result of the following code?

1: public class VisitPark {

2: enum AnimalsInPark {

3: SQUIRREL, CHIPMUNK, SPARROW;

4: }

5: public static void main(String[] args) {

6: AnimalsInPark[] animals = AnimalsInPark.values();

7: System.out.println(animals[1]);

8: } }

0%
0%
0%
0%
0%
100%
Переглянути це питання

Which functional interfaces complete the following code? (Choose all that apply.)

6: ____________ x = String::new;

7: ____________ y = (a, b) -> System.out.println();

8: ____________ z = a -> a + a;

0%
100%
0%
0%
100%
0%
100%
0%
Переглянути це питання

Which of the following is equivalent to this code?

UnaryOperator<Integer> u = x -> x * x;

0%
0%
0%
100%
0%
0%
Переглянути це питання

Which of the answer choices make sense to implement with a lambda? (Choose all that apply.)

100%
0%
100%
0%
0%
Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на dl.nure.ua?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome