title: type casting int to double java?
body: <p>I'm practicing debugging and there is a question that i'm unsure on, it's asking what is wrong and what can I do to fix it I read the book chapter on it but not specific enough. pasted from the book:</p>
  
  <p>int a = 26.4
          ^
  When you compile, this is the message: </p>
  
  <p>Test.Java:8: possible loss of precision 
  int a = 26.4;</p>
  
  <p>required: int 
  found : double 
  1 error </p>
  
  <p>I have a decent understanding on why there is an error, because of how double has a higher precedence than int and how an int cant necessarily store a double value.</p>
  
  <p>My question is, is there a way to type cast variable a into a double type? Or is the only way to fix this by changing a from int to double?</p>
  
  <p>thanks</p>