logo

Crowdly

TEB1043:Object Oriented Programming - January 2025

Шукаєте відповіді та рішення тестів для TEB1043:Object Oriented Programming - January 2025? Перегляньте нашу велику колекцію перевірених відповідей для TEB1043:Object Oriented Programming - January 2025 в ulearn.utp.edu.my.

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

Which of the following Java classes is an abstract class?

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

Consider the Java program below. Choose an INVALID statement than cannot be added in the place of "// A line to be added" in the main method.

class testing {

public final void m1() {

System.out.println("Hey!");

}

public static void m2() {

System.out.println("Salam sejahtera");

}

}

public class Quiz2Q9 extends testing {

public static void main(String[] args) {

// A line to be added

}

0%
0%
100%
0%
Переглянути це питання
Suppose a class has a method that is declared as final in a Java program. Which of the following statements is FALSE?

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

Which of the following statements about Java language is FALSE?

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

If class A inherits class B then class A is called the ___________.

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

Suppose you have two classes called Flight and Passenger. What is the best relationship you can create between the two classes?

100%
0%
0%
0%
Переглянути це питання
Which of the following is FALSE about enumerated data type?

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

Which line indicate AUTOUNBOXING in the code snippet below?

ArrayList<Double> grades = new ArrayList<Double>();

grades.add(3.2); // Line 1

grades.add(2.7); // Line 2

double sum = 0.0; // Line 3

for (int i=0; i < grades.size(); i++) {

sum += grades.get(i); // Line 4

System.out.println("Sum = " + sum);

}

0%
100%
0%
0%
Переглянути це питання
Which of the following is TRUE about ArrayList?

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

What will be the output of the program below?

import java.util.ArrayList;

public class Quiz2Q2 {

public static void main(String[] args) throws Exception {

ArrayList<Integer> arr = new ArrayList<>(); // 1

arr.add(100); // 2

System.out.println(arr.get(arr.size())); // 3

}

}

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

Хочете миттєвий доступ до всіх перевірених відповідей на ulearn.utp.edu.my?

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