where can i find more detailed explanation of answers of 12 and 13 in Exam A
Given an application that may be implemented using either an ArrayList or a Vector which of the two is preferred? Given an application that may be implemented using either an HashMap or a Hashtable which of the two is preferred?
When it comes to interface a class can be cast to interface implicitly if the class implements the interface. But explicit conversion is needed to cast an interface to class implementing the interface(which is legal even at runtime) or to a class not implementing the interface(illegal at runtime) this example might help you understand better
i found this explanation in one of the threads here ... Proceed as follows to get the decimal equivalent of a -ve number: say -8 1. Invert all the bits. --> so 1111 1000 becomes 0000 0111. 2. Strip all the leading zeros and convert to decimal. --> so 0000 0111 becomes 111 which is equivalent to 7. 3. Add 1 to the result and then put the negative sign. --> 7+1 = 8 and finally it becomes -8. so 1111 1000 = -8. To convert a -ve decimal to a binary just do the reverse. Taking the example of -8 1.Strip it off the -ve sign and subtract 1. -->so -8 becomes 8 and then 7. 2. Convert the decimal to binary -->7 is 0000 0111 in binary. 3.Invert the bits -->Result is 1111 1000. (same as the start of this message)