comprog ( methods, arrays, strings )

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/39

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

40 Terms

1
New cards

method

a named sequence of instructions grouped together to perform a task.

2
New cards

java’s predefined methods

built-in methods like sqrt() that perform specific operations.

3
New cards

argument

a value supplied to a method when it is called.

4
New cards

returned value

the value computed and returned by a method.

5
New cards

method header

the definition of a method, including return type, name, and parameter list.

6
New cards

return type

specifies the data type of the value returned by a method.

7
New cards

parameter list

enumerates the number and type of arguments a method requires.

8
New cards

formal parameters

names in the parameter list that represent the expected arguments.

9
New cards

writing your own methods

defining custom methods that may accept arguments and return values.

10
New cards

methods that return a value

methods that process input and return a computed result.

11
New cards

void methods

methods that perform a task but do not return a value.

12
New cards

local variables

variables declared within a method that exist only within that method.

13
New cards

arrays

a collection of variables of the same type, accessed using a single variable name and an index.

14
New cards

index

the position of an element in an array, starting from zero.

15
New cards

array object

the array itself, which can be referenced using its variable name without an index.

16
New cards

array length

the fixed number of elements an array can hold, accessed using the length field.

17
New cards

base type

the data type of elements stored in an array, such as int or String.

18
New cards

array declaration

the process of defining an array, specifying its type and variable name.

19
New cards

array instantiation

the creation of an array object with a specified length using new.

20
New cards

array initialization

assigning values to array elements, either individually or using shorthand notation.

21
New cards

arraycopy method

a method from the System class used to copy elements from one array to another.

22
New cards

for loops with arrays

loops used to process or populate array elements efficiently.

23
New cards

= operator with arrays

assigns one array reference to another, making them share the same memory location.

24
New cards

== operator with arrays

compares the memory addresses of arrays rather than their contents.

25
New cards

comparing arrays

checking if two arrays are equal by comparing their contents rather than their references.

26
New cards

string class

a reference type in java that represents sequences of characters.

27
New cards

string literal

a sequence of characters enclosed in quotation marks.

28
New cards

escape sequence

a combination of characters used to represent special characters in strings.

29
New cards

concatenation

combining strings using the + operator.

30
New cards

parse methods

methods in primitive wrapper classes that convert string values to numeric types.

31
New cards

equals method

a method used to compare the contents of two strings.

32
New cards

equalsIgnoreCase method

a method that compares two strings without considering case differences.

33
New cards

immutable object

an object that cannot be changed after it is created, such as a string.

34
New cards

length method

a method that returns the number of characters in a string, including spaces.

35
New cards

toLowerCase method

converts all characters in a string to lowercase.

36
New cards

toUpperCase method

converts all characters in a string to uppercase.

37
New cards

trim method

removes whitespace characters from the beginning and end of a string.

38
New cards

charAt method

extracts a character from a specific position in a string.

39
New cards

substring method

extracts a portion of a string based on specified start and end positions.

40
New cards

replace method

replaces part of a string that matches a given pattern with another text.