I will have to admit that there were other good questions. The interviewer clearly indicated that it was an optional question to ascertain how technical I was. He was also more interested in the approach.
Jimmy Clark
Ranch Hand
Joined: Apr 16, 2008
Posts: 2187
posted
0
A poor question in my opinion. Not sure how it demonstrates how "technical" a person is. If the question was about recitation of numeric casting rules it might make more sense. But to ask someone what will get "printed" is a bit looney ... and a waste of time.
Refer this also Java Puzzler book have explaination about it.
According to my way of thinking the process is as follows.
first step is narrowing primitive conversions
second step + third step is widening & then narrowing primitive conversions
fourth step is widening primitive conversions
Ninad Kulkarni wrote:Refer this also Java Puzzler book have explaination about it.
According to my way of thinking the process is as follows.
first step is narrowing primitive conversions
second step + third step is widening & then narrowing primitive conversions
fourth step is widening primitive conversions
If it was stolen from the java puzzler book, thats even worse
If it was stolen from the java puzzler book, thats even worse
All credit goes to authors of the Java Puzzlers book for this question already in java puzzle list in their book.
I given example of binary numbers to understand multiple cast process easily in the given question by using JLS3.0.