What are inner classes and what is the practical implementation of inner classes?

Inner classes are nested inside other class. They have access to outer class fields and methods even if the fields of outer class are defined as private.
public class Pcds
class pcdsEmp
// inner class defines the required structure
String first;
String last;
// array of name objects
clsName personArray[] = {new clsName(), new clsName(), new clsName()};
Normally inner classes are used for data structures like one shown above or some kind of helper classes.

asked Sep 13, 2013 in oops by rajesh
edited Sep 12, 2013
0 votes

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.