Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Encapsulation and abstraction are two fundamental concepts in object-oriented programming, but they serve different purposes and are implemented differently. Here’s a comparison of the two:
Encapsulation
public class Car {
private String color;
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;