Basic Java Syntax Questions
<p>I am doing a homework assignment (I am not one to lie) and I am honestly stumped at the questions.  I have 3 years of programming experience but am stumped on some of the simplest problems in the class, lol.  New to Java, not new to programming rather.  I would like to discuss why the questions result in an answer and why it is one way or another.</p>

<p>1) Write 3.4, is this a double or a float?</p>

<p>I want to say its a float by default, as it takes up less space (32 bits) versus a double (64) bits.  Since 3.4 is a small number, I would assume it is a float?</p>

<p>2) Declare x as a double and assign it the value of 3.4 (as a double).</p>

<p>I think it is <code>double x = 3.4d;</code> not 100% sure on this</p>

<p>3) Declare y as a float and assign it the value 3.4 (as a float).</p>

<p>Similar to above, i think it is <code>float y = 3.4f;</code></p>

<p>Not usually one to come on here and ask for HW help in this manner...but I have no textbook for another week as I just ordered it.  I would rather like to discuss why it is one way or another so I can get a better understanding of how Java works.  Thanks.</p>
