Easy
Can an abstract class have concrete members or methods?
Author: Eric HostaleryStatus: PublishedQuestion passed 1552 times
Edit
5
Community EvaluationsNo one has reviewed this question yet, be the first!
8
Can we extend an abstract class in Java?14
Is the following code valid?
class Person {
constructor(name, age) {
this.name = name;
this.age = age;
}
}
const person = new Person('John', 20);
console.log(person.name);
console.log(person.age);9
You need to develop a class for which there should be only one instance throughout your application. Which design pattern should you use for this?5
Can an interface inherit from another interface?7
Which design pattern allows to dynamically add responsibilities to an object?5
Implement the interface IEmailFormatter for the classes Person, Company, and ListOfPerson, which has a method GetEmailContent()5
Is the following code valid?
class Person {
constructor(name, age) {
this.name = name;
this.age = age;
}
}
const person = new Person('John', 20);
console.log(person.name);
console.log(person.age);