Programming Basics Flashcards
What does the term ‘white space’ mean?
The term white space refers to one of more consecutive space characters, tab characters, or line breaks.
What is a block?
A block is a group of one or more statements that’s enclosed in braces.
What is an identifier?
An identifier is a word that you make up to refer to a Java programming element by name.
What is the state of an object?
The state of an object consists of any data that the object might be keeping track of.
What is the behavior of an object?
The behavior of an object consists of actions that the object can perform.
What does the static keyword mean?
It means that you can call a method without first creating an instance of a class, because static methods are called from classes, not objects.
Creating an object from a class
ClassName variableName = new ClassName(Paramater-list);
Importing Java classes.
import package.class.method;
What is a class variable?
A class variable is a variable that any method in a class can access, including static methods such as main.
What is a local variable?
A local variable is a variable that’s declared within the body of a method.
What is a final variable?
A final variables, also called a constant, is a variable whose value you can’t change after it’s been intialized. To declare a final variable you must use the final keyword. Ex) final int WEEKDAYS = 5;
What are primitive types?
Primitive types are the data types defined by the language itself.
What are reference types?
Reference types are types defined by classes in the Java application programming interface, or by classes you create rather than by the language itself.
What is an integer?
An integer is a whole number that is, a number with no fractional or decimal portion.
What value can an integer hold?
Any value from -2 billion to +2 billion