LATEST UPDATE
When a return statement executes
- CORRECT ANSWER Method immediately terminates
Control goes back to the caller
Execution always begins
- CORRECT ANSWER at the first statement in the method main
Other methods are executed when...
- CORRECT ANSWER Only when they are called
A method call results in - CORRECT ANSWER transfer of control to the first statement
in the body of the called method
After the last statement of a method is executed
- CORRECT ANSWER control is passed back to the point immediately following the
method call
A value-returning method
- CORRECT ANSWER returns a value
After executing the method
- CORRECT ANSWER the returned value replaces the method call statement
Void method
- CORRECT ANSWER performs a desired operation without returning a value
Local identifier
- CORRECT ANSWER identifiers declared within a method (or block)
Global identifier
- CORRECT ANSWER identifiers declared outside of every method definition
does Java allow nested methods?
- CORRECT ANSWER NO
The scope of an identifier
- CORRECT ANSWER refers to where in the program an identifier is accessible
Two types of user-defined methods
- CORRECT ANSWER value-returning methods and void methods
,Variables defined in a method heading are called
- CORRECT ANSWER Formal parameters
Expressions, variables, or constant values in a method call are called
- CORRECT ANSWER Actual parameters
In a method call, the number of actual parameters and their types must
- CORRECT ANSWER match with the formal parameters in the order given
To call a method
- CORRECT ANSWER use its name together with the actual parameter list
Method heading and the body of the method are called
- CORRECT ANSWER the definition of the method
If a method has no parameters
- CORRECT ANSWER you need empty parentheses in method heading and method
call
User-defined methods execute only when
- CORRECT ANSWER Only when they are called
In a call statement
- CORRECT ANSWER specify only the actual parameters, not their data types
Void method:
- CORRECT ANSWER does not have a data type
The return type in the heading is the word void
To call the method, you use the method name together with the actual parameters in a
stand-alone statement
In a one-dimensional array
- CORRECT ANSWER the components are arranged in a list form
The array index always starts at
- CORRECT ANSWER 0
When an array is created, its elements are assigned the following default values
- CORRECT ANSWER 0 for the numeric primitive data types
null character for char types
false for boolean types
An array index can be
- CORRECT ANSWER any expression that evaluates to a nonnegative integer
Must always be less than the size of the array
, The base address of an array is
- CORRECT ANSWER the address of the first array component
When passing an array as an actual parameter,
- CORRECT ANSWER you use only its name
A method can
- CORRECT ANSWER return a value of the type array
Application Program Interface (API)
- CORRECT ANSWER Also known as a library, contains predefined classes and
interfaces for developing Java programs
Assembler
- CORRECT ANSWER A program to convert assembly language into machine
language
Assembly Language
- CORRECT ANSWER Low-Level language created to ease the code writing.
Bit
- CORRECT ANSWER A unit of measurement of information, 0 & 1 create digits known
as the binary number system.
Block
- CORRECT ANSWER Curly braces {}, every class has class blocking that groups the
data and methods of the class.
Block Comment
- CORRECT ANSWER (/*) Creates a block comment, computers will read the first (/*)
and ignore all text until the final (*/). (for multiply line instructions or comments)
Bus
- CORRECT ANSWER Subsystem of computer components that power and data flow
through.
Byte
- CORRECT ANSWER a sequence of 8 bits (enough to represent one character of
alphanumeric data) processed as a single unit of information
Bytecode
- CORRECT ANSWER Is similar to machine instructions but is architecture neutral and
can run on any platform that has a JVM.
Bytecode Verifier