CS Prelim 1 - Type: a set of values together with...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Type: a set of values together with operations on them. Variable: a variable is a named box with a value in the box; a variable is a name together with a value. Declaration of variable: a declaration of a variable gives the name of the variable and the type of value it can contain. Class – a file drawer containing manilla folder of objects Object – a manilla folder in the file drawer Static – in the class file drawer Non-static – in each manilla folder in the class’ file drawer - non-static method is a component of every instance of the class. A static method does not go in each instance; there is one copy of it, in the class’s file drawer 4 kinds of variables : - Non-static variable (field) defined in a class o Scope of a non-static variable is the body of all non-static methods in the class - Static variable o Scope of a static variable is the body of all methods defined in the class (static or non-static) - Parameter o Scope of a parameter is body of the method for which it is a parameter
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

CS Prelim 1 - Type: a set of values together with...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online