פורסם 2006 בדצמבר 618 שנים BITWISE OPERTORS - יודעים לעבוד על סוג משתנים שונים מINThttp://www.leepoint.net/notes-java/data/expressions/bitops.html
פורסם 2006 בדצמבר 718 שנים אבל במשהו אחד אתה טועהכן, אבל לא בזה אלא בזה - BITWISE OPERTORS - יודעים לעבוד על סוג משתנים שונים מINTbitwise operators עובדים גם על booleans. מה שיכול להכניס שגיאות בדיוק במקרים שלא מבינים את ההבדלים, ולכן חשבתי שהורידו את זה ב- java.
פורסם 2006 בדצמבר 718 שנים אולי לא חשבו על זה מההתחלה, ועכשיו הם צריכים לשמור תאימות לגרסאות קודמות של ה-JDK.
פורסם 2006 בדצמבר 718 שנים אבל זה כתוב בקישור של supermanJava's bitwise operators operate on individual bits of integer (int and long) values. If an operand is shorter than an int, it is promoted to int before doing the operations.
פורסם 2006 בדצמבר 718 שנים ואז מתורגם חזרה לבוליאני בשביל ה-if?הממ.. כנראה שלא.זה מהאתר של Sun15.22.2 Boolean Logical Operators &, ^, and |When both operands of a &, ^, or | operator are of type boolean, then the type of the bitwise operator expression is boolean.For &, the result value is true if both operand values are true; otherwise, the result is false.For ^, the result value is true if the operand values are different; otherwise, the result is false.For |, the result value is false if both operand values are false; otherwise, the result is true.http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html
פורסם 2006 בדצמבר 718 שנים אני חייב לציין,איכסה.היתה תקופה שהיה נראה כאילו Java מנסה למנוע ממתכנתים לעשות שטויות.נו, אולי הם רוצים להתחרות ב- C.
ארכיון
דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.