Show Menu
Cheatography

CS101 Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Arithmetic

*
Multip­lic­ation
+
Addition
-
Subtra­ction
/
Division
%
Modulo

Relational

<
Less Than
>
Greater Than
<=
Less than or equal to
>=
Greater than or equal to
==
Equal to
!=
Not equal to

Logical, Ternary, and Unary

&&
logical AND
||
logical OR
? :
Ternary Operator
expr++
Postfix Increment
expr--
Postfix Decrement
 

String Methods

.split­(regex, limit)
Turns a string into an array given a delimiter.
.charA­t(int index)
Returns the character at a given index within a string.
.index­Of(­String str)
Returns the index of a the string found, if not found, returns -1
.equal­s(S­tring str)
Compares a string with another string. Returns boolean value.
expr.length()
Returns the length of the string.