apcsa

0.0(0)
Studied by 3 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/17

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:38 PM on 5/15/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

18 Terms

1
New cards

random int between 5 and 10, inclusive

(int)(Math.radom()*6) + 5;

2
New cards

formatting of random

(int)(Math.random()*range) + min
range = max-min +1

3
New cards

private String example;
public Object(String thingy){
??
}

example = thingy

4
New cards

Insertion sort

starts with first item, shifts individual items one at a time

5
New cards

merge sort

halves and then halves and then halves

6
New cards

selection sort

passes through whole thing and puts the lowest at the beginning

7
New cards

iteration search

loops instead of recursion

8
New cards

bubble sort

items 0 and 1 compare then swap, items 1 and two compare and swap… etc

9
New cards

For each loops

int[] nums = new int[];

normal: for(int i = 0; i < nums.length; i++){
}
for each: for(int num: nums){
}
the int before the colon is the same as i, the number after the same as whatever i is less than

10
New cards

nested for each loop

int[][] matrix = new int[][];
for(int row: matrix){
for(int col: row){
}
}
second nested calls the i of the first one

11
New cards

for each loops with arraylist

ArrayList<String> names = new ArrayList<String>();

for(String i: names){
System.out.println(i);
}
no .get and cannot change elements

12
New cards

for each loops with array

String[] names = new String[];
for(i: names){
System.out.println(i);
}
no [ ]

13
New cards

class header

public class Example{
public static void main(String[] args){

14
New cards

final

cannot be changed. ex: final Double pi = 3.14

15
New cards

instance variables/attributes

the class variables, ex:

String place();

16
New cards

super

calls the constructor or parametized constructor from the superclass

public PainterPlus(){
super();
}

17
New cards

escape sequences

\n = new line

\” = double quote

\\ = backslash

18
New cards

De morgans laws

the rules with || && ! with parenthesis