title: Java Class variable's declaration from other variable
body: <p>I have a java domain class that models a table in the database, I have two fields
  Double Budget1
  Double Budget 2
  I need to add another field in the class as a member variable
  Double totalBudget which is some of budget1 and budget2, how can I do this in java8?</p>
  
  <pre><code>@Formula("(SELECT SUM(c.budget1) FROM table1)
  private Double budget1;
  
  @Formula("(SELECT SUM(c.budget2) FROM table2)
  private Double budget2;
  
  @Transient
  private Double totalBudget = budget1 + budget2;
  </code></pre>
  
  <p>This gives me an error</p>