engineering recuitment NIELIT Scientific Assistant Mock Test 2025 Programming and Data Structure OOPs concept
Consider the code and select the wrong choice.
class Hero {
char name10;
public void disp() {
System.out.println(name);
}
}
1
This maintains encapsulation
2
This code doesn't maintain encapsulation
3
This code is vulnerable
4
This code gives error