java - An interview topic: What can go wrong with this code? -


a simple calculator class that's wired spring bean in web application:

public class calculator {      int result;       public int addtwonumbers(int first, int second) {          result = first + second;          return result;      }  }  

what can potentially go wrong this?

multi threading problems. default spring beans singletons.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -