AP Comp Sci A First Quiz lol

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/112

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.

113 Terms

1
New cards

Console

Text window for displaying output in Java.

2
New cards

Class

A blueprint for creating objects in Java.

3
New cards

Main Method

Entry point for Java program execution.

4
New cards

String Literal

Fixed sequence of characters in quotes.

5
New cards

System.out.print

Prints text without a newline in Java.

6
New cards

System.out.println

Prints text followed by a newline in Java.

7
New cards

Escape Characters

Special codes for formatting output in Java.

8
New cards

New Line Escape

Code to create a new line: \n.

9
New cards

Tab Escape

Code for inserting a tab: \t.

10
New cards

Double Quote Escape

Code for printing quotes: ".

11
New cards

Backslash Escape

Code for printing backslash: \.

12
New cards

Curly Braces

Used to define code blocks in Java.

13
New cards

Good Style

Readable and organized code structure.

14
New cards

Bad Style

Poorly formatted and hard to read code.

15
New cards

Comment

Non-executable text for code documentation.

16
New cards

Single-line Comment

Comment initiated with // in Java.

17
New cards

Multi-line Comment

Comment enclosed between /* and */.

18
New cards

Eagleson's Law

Code not revisited in six months is forgotten.

19
New cards

Variable

Named storage location for data in Java.

20
New cards

Variable Declaration

Specifying type and name of a variable.

21
New cards

Variable Initialization

Assigning an initial value to a variable.

22
New cards

Assignment Operator

Equal sign used to assign values to variables.

23
New cards

CamelCase

Naming convention with capitalized words.

24
New cards

Debugging

Identifying and fixing errors in code.

25
New cards

Commenting Out Code

Disabling code by turning it into a comment.

26
New cards

Scanner

Java class for reading user input.

27
New cards

Integer Type

Data type for whole numbers in Java.

28
New cards

Double Type

Data type for decimal numbers in Java.

29
New cards

Character Type

Data type for single characters in Java.

30
New cards

testScore

Variable representing a student's test score value.

31
New cards

scoreOne

Integer variable initialized with value 2.

32
New cards

scoreTwo

Integer variable initialized with value 5.

33
New cards

RAM

Random Access Memory, computer's short-term memory.

34
New cards

Bit

Smallest data unit, either 0 or 1.

35
New cards

Byte

Collection of 8 bits.

36
New cards

Primitive Types

Basic data types in Java, excluding objects.

37
New cards

byte

Stores very small integers, 8 bits.

38
New cards

short

Stores small integers, 16 bits.

39
New cards

int

Stores normal integers, 32 bits.

40
New cards

long

Stores large integers, 64 bits.

41
New cards

float

Stores less precise decimal values, 32 bits.

42
New cards

double

Stores more precise decimal values, 64 bits.

43
New cards

boolean

Stores true or false value, 1 bit.

44
New cards

char

Stores a single character, 16 bits.

45
New cards

ASCII

Character encoding standard with 256 characters.

46
New cards

Casting

Converting one data type to another.

47
New cards

Explicit Casting

Directly specifying conversion to another type.

48
New cards

Implicit Casting

Automatic conversion from smaller to larger type.

49
New cards

Arithmetic Operators

Operators for mathematical operations: +, -, *, /.

50
New cards

Compound Operators

Shorthand for modifying variable values.

51
New cards

Increment Operator

Increases variable value by one.

52
New cards

Decrement Operator

Decreases variable value by one.

53
New cards

ArithmeticException

Error thrown when dividing by zero.

54
New cards

Integer Division

Division where decimal part is truncated.

55
New cards

Modulus Operator

Returns remainder of division.

56
New cards

Constant

Unchangeable value throughout the program.

57
New cards

final Keyword

Designates a variable as a constant.

58
New cards

Magic Number

Hardcoded value without clear purpose.

59
New cards

Magic Numbers

Hard-coded values that reduce code clarity.

60
New cards

Self-Documenting Code

Code where names describe their purpose.

61
New cards

Constants

Fixed values that cannot be changed.

62
New cards

Variables

Named storage for values that can change.

63
New cards

Literals

Fixed values directly written in code.

64
New cards

Boolean

A value that is either true or false.

65
New cards

Logical Operators

Operators to combine boolean expressions.

66
New cards

AND Operator

True if both expressions are true.

67
New cards

OR Operator

True if at least one expression is true.

68
New cards

NOT Operator

Reverses the value of a boolean expression.

69
New cards

Comparison Operators

Operators to compare numerical values.

70
New cards

Equality Operator

Checks if two values are equal (==).

71
New cards

If Statement

Branches code based on a boolean expression.

72
New cards

Else Statement

Executes code when the if condition is false.

73
New cards

Else If Statement

Adds additional conditions to an if statement.

74
New cards

Switch Statement

Organizes multiple cases based on a variable.

75
New cards

String

A sequence of characters, not a primitive type.

76
New cards

MACRO_CASE

Convention for naming constants in all caps.

77
New cards

camelCase

Naming convention for variables with mixed case.

78
New cards

PascalCase

Naming convention for classes with initial capitals.

79
New cards

Chaining Comparisons

Combining comparisons using logical operators.

80
New cards

Boolean Expression

An expression that evaluates to true or false.

81
New cards

Critical Hit Chance

Probability of scoring a critical hit.

82
New cards

Fixed Values

Constants representing unchangeable data.

83
New cards

Bugs

Errors caused by incorrect code logic.

84
New cards

Code Clarity

The ease of understanding code structure.

85
New cards

Data Types

Categories of data that determine value behavior.

86
New cards

String Immutability

Strings cannot be changed after creation.

87
New cards

String Comparison

Use .equals() or .equalsIgnoreCase() methods.

88
New cards

charAt()

Returns character at specified index in String.

89
New cards

substring()

Extracts part of a String between indices.

90
New cards

length()

Returns the number of characters in String.

91
New cards

toUpperCase()

Returns uppercase version of the String.

92
New cards

toLowerCase()

Returns lowercase version of the String.

93
New cards

contains()

Checks if String includes specified text.

94
New cards

indexOf()

Finds first occurrence index of specified text.

95
New cards

replace()

Replaces occurrences of a specified String.

96
New cards

Concatenation

Combining two Strings using + operator.

97
New cards

Scanner Class

Used for input from console in Java.

98
New cards

Creating Scanner

Instantiate Scanner with new Scanner(System.in).

99
New cards

next()

Reads next word input as String.

100
New cards

nextInt()

Reads next integer input as int.