Looking for Object Oriented Development (MESIIN472925) test answers and solutions? Browse our comprehensive collection of verified answers for Object Oriented Development (MESIIN472925) at learning.devinci.fr.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
What is method overloading?
Given :
class A {
A() {
display();
}
void display() {
System.out.println("A");
}
}
class B extends A {
int value = 10;
void display() {
System.out.println(value);
}
}
What will be printed when this is executed?
public class Test {
public static void main(String[] args) {
A obj = new B();
}
}
In a Java EE application, what is the main purpose of a cookie?
Polymorphism applies for both static or non-static methods of a class
What is the output of the following code:
import java.util.*;
class User {
String name;
User(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof User)) return false;
User user = (User) o;
return Objects.equals(name, user.name);
}
}
public class Test {
public static void main(String[] args) {
Set<User> users = new HashSet<>();
users.add(new User("Alice"));
users.add(new User("Alice"));
System.out.println(users.size());
}
}
<td>${student.lastName}</td> in a JSP?A class can be declared as public, private or package private.
myConn.close() when using a JDBC connection pool?Which of the following statements is true about checked exceptions?