Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

INTRO. TO JAVA PROGRAMMING EXAM2024/2025 LATEST UPDATE

Rating
-
Sold
-
Pages
16
Grade
A+
Uploaded on
17-11-2024
Written in
2024/2025

INTRO. TO JAVA PROGRAMMING EXAM2024/2025 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

Show more Read less
Institution
Course

Content preview

INTRO. TO JAVA PROGRAMMING EXAM2024/2025
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

Written for

Course

Document information

Uploaded on
November 17, 2024
Number of pages
16
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$18.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
janetheuri
3.0
(1)

Get to know the seller

Seller avatar
janetheuri Teachme2-tutor
Follow You need to be logged in order to follow users or courses
Sold
7
Member since
1 year
Number of followers
0
Documents
517
Last sold
10 months ago

3.0

1 reviews

5
0
4
0
3
1
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions