🧭 CapCompassfree study planner

Variables and Expressions — Class 11 ISC Computer Science revision notes

A 4-page visual revision sheet for Variables and Expressions, written for Class 11 ISC Computer Science. Formulas, diagrams and the traps that cost marks, laid out to be read the night before rather than the term before. Free, and it opens inside CapCompass.

Variables and Expressions revision notes, page 1 of 4 Page 1 as PDF
A preview of page 1 — all 4 pages open full size in the app.

Variables and Expressions in one look

naming a value, then combining values into new ones

Declaring and initialising a variable

  • a declaration states a variable's type and name, such as int marks, and reserves it a slot of the right size
  • an initialisation gives that slot its first value, either on the same line as the declaration or on a later one
  • a local variable declared but never given a value cannot be used in an expression, the compiler rejects it as possibly unassigned, though a field of a class is given a default instead
  • several variables of the same type may be declared together on one line, their names separated by commas

Naming rules and conventions

  • a name must start with a letter, an underscore or a dollar sign, never a digit, and the rest may add digits too
  • Java is case sensitive, so total and Total name two different variables
  • a small fixed set of words is reserved by the language itself, such as class, if and int, and none of these may be used as a name
  • convention, not a rule the compiler enforces: variable and method names start lower case and grow a capital at each new word, such as totalMarks

Local scope against instance scope, the short version

Local variable
  • declared inside a method or a block
  • exists only while that method or block is running, then it is gone
Instance variable
  • declared inside a class, outside any method
  • exists for as long as the object holding it exists

Page 1 of 4. The full sheet, all 4 pages, opens free in the app.

What this Variables and Expressions sheet covers

Open the full Variables and Expressions sheet →Free, works offline, no account needed. All 4 pages, plus a study plan built around your own exam dates.

How CapCompass uses this sheet

These notes are not a standalone PDF. CapCompass plans Computer Science chapter by chapter against your real exam dates and free hours, and when the plan reaches Variables and Expressions the sheet opens inside the study block itself — at the page covering the sub-topic that block is on, with the timer still running. Revision arrives at the moment the plan says revise, instead of having to be gone looking for.

More Computer Science Class 11 revision notes