OCA Summary 1 pag 40 Flashcards
Java classes consist of members called ___ and ___.
fileds and methods
An ___ is an instance of a Java class
object
There are three styles of comments:
single-line comment
multiline comment
Javadoc comment
Java beings program execution with a ____ method
main()
The most common signature for the main() method run from the command line is:
public static void main(String[] args)
Arguments are passed in after the ___ ___
class name
Arguments are indexed starting with ___
0
Java code is organized into folders called ____
packages
To reference classes in other packages, you use an ___ ____.
import statement
A wildcard ending an import statement means you want to import all ___ in that ____
classes
package
What is the special package that does not need to be imported?
java.lang
Constructors create Java ____
objects
A constructor is a method matching the ___ ___ and omitting the ___ ___
class name return type
When an object is instantiated, ___ and ____ of code are initialized first. Then the ___ is run.
fields and block of code
constructor
____ ____ are the basic building blocks of Java types. They are assembled into reference types.
Primitive types
Reference types can have methods and be assigned to ___
null