Is this códe valid?
class hello{
String usrname;
int usrid;
class info{
public void getInfo(){
String favsub="Maths";
String favlang="Java";
int std=10;
}
}
void getval{
usrname="BP";
usrid=10111023;
}
class access {
hello world=new hello();
world.getval();
world.getInfo();
}
}
____
• Give a reason to support your answer.
• PL:- Java
Answers
Answered by
0
class hello{
String usrname;
int usrid;
class info{
public void getInfo(){
String favsub="Maths";
String favlang="Java";
Similar questions