The real gotcha in your code is the first line itself. The first line is violating the keywords of java in a wrong way. What you have mentioned is "Public Class box". This is NOT allowed. Public and Class are NOT keywords in java, they are in fact "public" and "class" [Notice the small p and small c]

So your error of assigning char into double is not actually an error, instead the first line itself is an error. Even the name of the class should be Box not box [notice capital B].

I hope now you know where you lost one mark.

Goldest

December 28th, 2010, 05:11 AM

goldest

Re: Is My answers correct??

Here is a link in case if you are interested to know more about ASCII: ASCII-Table

This describes chars and their corresponding values in different formats.