1/24
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
What is a class?
A class is the name for a type whose values are objects.
What is an object?
An entity that stores data and takes actions.
What do objects belonging to the same class have in common?
They have the same methods.
Can objects belonging to the same class have different data?
Yes, each object can have different data values.
What are the actions that an object can take called?
Methods
What can a method do?
It can return a value of a single type and or perform an action.
What is the general syntax for calling a method?
object.method(arguments)
Are Java strings immutable?
Yes
How are Java strings similar to Python strings?
They are both immutable.
What is a major difference between manipulating strings in Java and Python?
Java uses method calls where Python uses operators.
Can you access a character in a Java string?
Yes using a method called charAt()
Can you obtain a substring from a Java string?
Yes using substring()
What does substring() do?
It returns a substring from a specified starting position up to, but not including, the specified ending position.
What does indexOf() do?
Finds the first occurrence of a specified character/string.
What symbol indicates an escape sequence?
A backslash immediately preceding a character.
What happens to the character following a backslash?
It does not have its usual meaning.
How many characters is an escape sequence regarded as?
One character, even though it is formed using 2 symbols.
How does a Java line comment begin?
//
How does a Java block comment begin?
/*
How does a Java block comment end?
*/
What is the difference between // and /* */?
// is a line comment, while /* */ is a block comment that can span multiple lines.
What is javadoc?
A java program that automatically extracts documentation from documentation comments in classes.
What makes a block comment a documentation comment recognised by javadoc?
It begins with /**
What does a well-written program mean by being "self-documenting"?
Its structure and purpose are made clear through meaningful identifier names and proper indentation.
How should nested structures be indented?
The structure inside another structure should be indented one additional level.