Meaning of characters?

Sorry but I’ve looked everywhere try to find out what :: means, and <<, and lastly and if statement with only one reference e.g. “if (var)” can any one tell me or direct me to a source to educate myself?

:: is the scope resolution operator
<< and >> are bit shift operators

0 = false, anything else = true (for numerical data types)

int var = 4;

if( var ){
  Serial.println( "test" );

Serial.println( “test” ); always runs as var is equivalent to true

:: is the scope resolution operator - typically used between a class name and a class method.

<< is an operator defined in the iostream class and often overloaded to allow output of additional types of data in an intuitive format.

In an if statement, the part between the ( and ) is evaluated. If the evaluation is true, the body is executed. If not, it isn’t. If the part between the ( and ) is a boolean variable, the result is true or false with no evaluation needed.

Thanks !