About 50 results
Open links in new tab
  1. Casting variables in Java - Stack Overflow

    Mar 13, 2011 · Casting in Java isn't magic, it's you telling the compiler that an Object of type A is actually of more specific type B, and thus gaining access to all the methods on B that you wouldn't have had …

  2. c# - Direct casting vs 'as' operator? - Stack Overflow

    Sep 25, 2008 · Custom implicit/explicit casting: Usually a new object is created. Value Type Implicit: Copy without losing information. Value Type Explicit: Copy and information might be lost. IS-A …

  3. What are the rules for casting pointers in C? - Stack Overflow

    Jun 23, 2013 · There are rules about casting pointers, a number of which are in clause 6.3.2.3 of the C 2011 standard. Among other things, pointers to objects may be cast to other pointers to objects and, …

  4. c# - Casting a variable using a Type variable - Stack Overflow

    In C# can I cast a variable of type object to a variable of type T where T is defined in a Type variable?

  5. Casting objects in Java - Stack Overflow

    Mar 15, 2011 · Casting can be used to clearly state that you are calling a child method and not a parent method. So in this case it's always a downcast or more correctly, a narrowing conversion.

  6. casting - Converting double to integer in Java - Stack Overflow

    Jun 24, 2011 · is there a possibility that casting a double created via Math.round() will still result in a truncated down number No, round() will always round your double to the correct value, and then, it …

  7. What is the difference between static_cast<> and C style casting?

    See A comparison of the C++ casting operators. However, using the same syntax for a variety of different casting operations can make the intent of the programmer unclear. Furthermore, it can be …

  8. Difference between casting to String and String.valueOf

    May 29, 2013 · 5 Casting means that the object needs to be of type String, while String.valueOf() can take other types as well.

  9. casting - Explanation of ClassCastException in Java - Stack Overflow

    May 25, 2009 · Do you understand the concept of casting? Casting is the process of type conversion, which is in Java very common because its a statically typed language. Some examples: Cast the …

  10. Casting int to bool in C/C++ - Stack Overflow

    Jul 22, 2015 · I'm wondering about casting in the reverse direction... In the code below, all of the following assertions held true for me in .c files compiled with Visual Studio 2013 and Keil µVision 5. …