java - Difference between class declaration -


what's difference between declaring class inside of class , declaring class in separate file?.

literally, nested classes added java 2 reasons: 1. source code clarity. 2. name-conflict reduction.

java didn't need support doing this, totally doing programmers "solid" because i'm sure know how messy code can when you're in moment of all.

to answer question, explicitly: difference there not difference, makes code easier read , end less name-conflict mistakes.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -