In Java, every method must be declared with an access modifier, which defines the visibility of the method. The access modifiers include public, private, protected, and package-private (default). The choice of access modifier determines where the method can be accessed from.
B is the correct answer as we cannot have a method inside another method.
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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.
Eligi
6 months ago___Anu___
7 months, 2 weeks agosupercoder
9 months, 1 week agotabrezshaikh13
1 year ago