Why I cant' use nested classes/Objects?
<p>I often do stuff like this while coding:</p>

<pre><code>getNamedJdbcTemplate().update(sql, new MapSqlParameterSource() {

        {
            addValue("a", obj.getA());
            addValue("b", obj.getB());
            addValue("c", obj.getC());
        }
    });
</code></pre>

<p>or this</p>

<pre><code>getJdbcOperations().queryForObject(sql, new Object[] { id}, new RowMapper&lt;Obj&gt;(){

        @Override
        public Obj mapRow(ResultSet rs, int rowNum) throws SQLException {
            // TODO Auto-generated method stub
            return null;
        }});
</code></pre>

<p>I also use a lot off Inner classes with Java methods.</p>

<p>For sure, if I use the code more then once I will place it on a different class so I can reuse it... the problem is that my team mates don't like this, and nobody is able to give me a proper reason of why not... </p>

<p>They talk a lot about memory leaks and Garbage Collection(GC) but I believe that those are stuff from the past.
I'm using Java6 and Spring 3. the apps are deployed on a Tomcat 6 server.</p>
