This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi - here is question # 14 from MindQ test: 14. Given the variable declarations below: byte myByte; int myInt; long myLong; char myChar; float myFloat; double myDouble; Which one of the following assignments would need an explicit cast? a) myInt = myByte; b) myInt = myLong; c) myByte = 3; d) myInt = myChar; e) myFloat = myDouble; f) myFloat = 3; g) myDouble = 3.0; I think (a,d,f) are correct, but MinQ thinks that only (a,f) are correct !!? I tested it with compiler like : int a = 10; char b = 'x'; a=b; and it compiles just fine without any cast!!! Is it MindQ mistake ? What do u think ? Thank you. Ivan.