employer cover photo
employer logo
employer logo

Tata Consultancy Services (North America)

Ist dies Ihr Unternehmen?

Frage im Vorstellungsgespräch bei Tata Consultancy Services (North America)

What is the difference between an Inner Class and a Sub-Class?

Antwort im Vorstellungsgespräch

Anonym

10. Aug. 2019

An Inner class is a class which is nested within another class. An Inner class has access rights for the class which is nesting it and it can access all variables and methods defined in the outer class. A sub-class is a class which inherits from another class called super class. Sub-class can access all public and protected methods and fields of its super class.