Example: int a,b,c; In this statement,comma is a separator and tells to the compiler that these (a, b, and c) are three different variables. 2) Comma (,) as an operator Sometimes we assign multiple values to a variable using comma, in that case comma is known as operator. Example...
Java - OOPS Benefits Java - Procedural Vs OOP's Java - Polymorphism Java - Encapsulation Java - Multithreading Java - Serialization Java Operator & Types Java - Operator Java - Logical Operators Java - Conditional Operator Java - Assignment Operator Java - Shift Operators Java - Bitwise Complement...
5 / 2; // = 2.5 // Bitwise operations also work; when you perform a bitwise operation your float // is converted to a signed int *up to* 32 bits. 1 << 2; // = 4 // Precedence is enforced with parentheses. (1 + 3) * 2; // = 8 // There are special primitive values: ...