Explain the concept of encapsulation.
복습용 저장
복습용 저장
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
WithoutBook은 주제별 면접 질문, 온라인 연습 테스트, 튜토리얼, 비교 가이드를 하나의 반응형 학습 공간으로 제공합니다.
Know the top OOPs interview questions and answers for freshers and experienced candidates to prepare for job interviews.
Know the top OOPs interview questions and answers for freshers and experienced candidates to prepare for job interviews.
Search a question to view the answer.
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
class MathOperations {
add(a, b) {
return a + b;
}
add(a, b, c) {
return a + b + c;
}
}
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
interface Printable {
print();
}
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
class Animal {
speak() {
console.log('Animal speaks');
}
}
class Dog extends Animal {
speak() {
console.log('Dog barks');
}
}
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
class MyClass {
destructor() {
// clean up resources
}
}
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
class Shape {
virtual calculateArea() = 0;
}
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
abstract class Printer {
abstract print();
}
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
class Vehicle {
constructor(make) {
this.make = make;
}
}
class Car extends Vehicle {
constructor(make, model) {
super(make);
this.model = model;
}
}
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
final class MyFinalClass {
// class content
}
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
class Parent {
static show() {
console.log('Static method in Parent');
}
}
class Child extends Parent {
static show() {
console.log('Static method in Child');
}
}
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
Example:
abstract class Shape {
public abstract void Draw();
}
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.
이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.