Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

+= operator casting in java

    int x = 0;
    x += 1.1;    // just fine; hidden cast, x == 1 after assignment
    x = x + 1.1; // won't compile! 'cannot convert from double to int'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #operator #casting #java
ADD COMMENT
Topic
Name
5+3 =