Given the definition of the Vehicle class: class Vehicle { String name; void setName (String name) { this.name = name; } String getName() { return name; } } Which action encapsulates the Vehicle class? Vehicle class public.
For encapsulation to be carried out, the variable must be private and accessed via methods, starting with "get" or "is" also for "boolean" and "set". So the answer is C.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Destroyer
Highly Voted 4 years, 7 months agoiSnover
Most Recent 5 months, 3 weeks agosteefaand
5 months, 3 weeks ago