AP Computer Science A - Chapter 3

syntax

Very rigid rules which the text of a program is governed by are known as __________.

style

_______ is intended to make programs more readable. This is a very important element of software engineering.

main method

The ________ __________If present, it is better to put it at the bottom of the class.

comments

Start the source code of each Java class with a _________ that briefly describes the purpose of the class, its author, perhaps the copyright arrangement, history of revisions, etc.

import statements

________ ____________ tell the compiler where to look for other classes used by this class.

class header

__________ __________states the name of the class and whether or not it is visible to other classes.

class definition

A ________ __________ is a section of code contained within braces; its fields, constructors, and methods.

/ *

A comment appears between these 2 marks.

//

A comment appears AFTER these 2 marks.

Javadoc

A utility program which generates documentation in HTML format automatically from special "documentation" comments in the Java source.

Javadoc comment

/*
/ -- each line in between also starts with a *

reserved words

A number of words reserved for a special purpose. Each word has a particular meaning and can be used only in its strictly prescribed way. All Java _______ ______ use only lowercase letters.

names of classes

Start with a capital letter.

names of methods and variables

Start with a lowercase letter

CamelCase

If a name consists of two or more words, all words starting with the second are capitalized.

universal constants

May use all caps and an underscore character between words [i.e., TAX_RATE, MAX_VALUE, MIN_VALUE]

class and object names

__________________ usually sound like nouns [i.e., Student]

method names

__________________ often sound like verbs [i.e., getName]

semicolon

Declarations and other statements in Java are terminated with a ____________.

braces { }

Statements can be grouped into blocks using ___________

nesting

Statements inside a block are usually indicated by a fixed number of spaces equal to one tab.

super

It is used inside a sub-class method definition to call a method defined in the _____ class. Private methods of the ______-class cannot be called. Only public and protected methods can be called by the ________ keyword.

new

In Java, the ______ key word is used to create new objects.

implements

Java Reserved Word used to make a class adhere to contract defined by an interface.

extends

When a class C ______ class B, C automatically has all variables and methods defined in class B (except private variable and methods).

final

In Java we use the _____ keyword in a variable declaration to make its value not change.

syntax

Very rigid rules which the text of a program is governed by are known as __________.

style

_______ is intended to make programs more readable. This is a very important element of software engineering.

main method

The ________ __________If present, it is better to put it at the bottom of the class.

comments

Start the source code of each Java class with a _________ that briefly describes the purpose of the class, its author, perhaps the copyright arrangement, history of revisions, etc.

import statements

________ ____________ tell the compiler where to look for other classes used by this class.

class header

__________ __________states the name of the class and whether or not it is visible to other classes.

class definition

A ________ __________ is a section of code contained within braces; its fields, constructors, and methods.

/ *

A comment appears between these 2 marks.

//

A comment appears AFTER these 2 marks.

Javadoc

A utility program which generates documentation in HTML format automatically from special "documentation" comments in the Java source.

Javadoc comment

/*
/ -- each line in between also starts with a *

reserved words

A number of words reserved for a special purpose. Each word has a particular meaning and can be used only in its strictly prescribed way. All Java _______ ______ use only lowercase letters.

names of classes

Start with a capital letter.

names of methods and variables

Start with a lowercase letter

CamelCase

If a name consists of two or more words, all words starting with the second are capitalized.

universal constants

May use all caps and an underscore character between words [i.e., TAX_RATE, MAX_VALUE, MIN_VALUE]

class and object names

__________________ usually sound like nouns [i.e., Student]

method names

__________________ often sound like verbs [i.e., getName]

semicolon

Declarations and other statements in Java are terminated with a ____________.

braces { }

Statements can be grouped into blocks using ___________

nesting

Statements inside a block are usually indicated by a fixed number of spaces equal to one tab.

super

It is used inside a sub-class method definition to call a method defined in the _____ class. Private methods of the ______-class cannot be called. Only public and protected methods can be called by the ________ keyword.

new

In Java, the ______ key word is used to create new objects.

implements

Java Reserved Word used to make a class adhere to contract defined by an interface.

extends

When a class C ______ class B, C automatically has all variables and methods defined in class B (except private variable and methods).

final

In Java we use the _____ keyword in a variable declaration to make its value not change.