Codecademy Cheat Sheet



NEW - Cheat Sheets

From Today’s newsletter:

5/11/2020 Learn SQL: Queries Cheatsheet Codecademy 2/4 SELECT Statement The SELECT. statement returns all columns from the provided table in the result set. The given query will fetch all columns and records (rows) from the movies table. Wildcard The wildcard can be used in a LIKE operator pattern to match any single unspecified character. University of the Fraser Valley.

Growing up, we had to memorize the spelling of words like “return,” remember that 12 x 12 = 144, and recall the conjugations of tener . Coding is not so different, having to memorize specific syntax, rules, and commands. And in coding, you’ll get an error if you misspell return , so it’s important to remember the details.

But coding should be less about rote memorization and more about understanding the principles at work. So to help you focus more on deeper understanding, we created Codecademy Cheat Sheets.

You can refer to a Cheat Sheet when you’re building your next project or querying a new data set. We also made them downloadable as PDFs, so you can take them with you anywhere.

We currently have cheat sheets for the following courses:

More to come in the future. You’ll find them at the end of each relevant lesson.

  • Java Cheat Sheet

This cheat sheet summarizes common parts of the syntax of the Java programming language. It also provides techniques for handling common procedures. This sheet is not a complete overview.

Basics

Common terms

variablepiece of data that can hold a value
objectrepresents something in real world
classdefinition of an object (like a blueprint or recipe)
attributevariable, part of a class, also called: field, member- or instance variable
methodset of statements (code), part of a class

Hello World

Built-in types

TypeExample valuesCommon operators
int3, 400, -200, 0+ - / * %
booleantrue false&& || !
char'a' '3', '/', '%'
String'Hello' 'world peace' '3.5'+

int, boolean, char are primitive types, String is a class.

Codecademy Cheat Sheet

Variables and Types

Declare

Declare & assign value

Type is an object

Class

Definition

Object

Declare an object p of type Person:

Declare & initialize

Codecademy Cheat Sheet Javascript

Object p becomes a new Person:

Object p is an instance of the class Person.

Method

Definition: class with two methods

Writing style

variable names start with a lowercase letter;
class names start with a capital letter;
indent-code blocks;

Code structure

source file (.java)

class

method2
statement;
statement;

What goes in a source file?

What goes in a class?

What goes in a method?

Conditions

Booleans

Boolean expression

If

Codecademy Cheat Sheet

Boolean as result of method

Boolean operators

Expressions

Basic

Operators

Call (=use) methods

Call method save() of object context

Method returns a value

More info

Learn more at:

Alternative cheatsheets

API

An API is a description of a library. A library is a set of classes (also called: package) to add to your program.

Sequel Command Cheat Sheet

Import

Codecademy Html Cheat Sheet

Put import statements at the top of your code. Use class ArrayList from package java.util:





Comments are closed.