Given below the sample code :
class Demo{
demo() {
}
public class Demo {
funtion() {
}
}
}
How can we correct the above code? Select appropriate option :
1. inner class should be declare as "static"
2. inner class must also declared it's constructor.
3. change the name of the inner class.
4. no need of correction.
An inner class can't have the same name as its enclosing class.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.