PR1 computer science

studied byStudied by 2 people
0.0(0)
Get a hint
Hint

block comment

1 / 29

flashcard set

Earn XP

Description and Tags

im gonna die

30 Terms

1

block comment

the compiler will ignore any text between /* */

New cards
2

class declaration

  • identifies name, start, and end of the class

  • class name MUST match file name

New cards
3

main method

controls all the action in the program

New cards
4

System.out

object that generates output to console

New cards
5

output

  • what the computer makes from the input

  • what comes out as a result of the code

New cards
6

console

where the output is printed

New cards
7

System.out.print

  • display whatever is in () on screen but wait at the end of the line for more info to display

New cards
8

System.out.println

  • display () and move cursor to the next line

New cards
9

compiler

translates the code in the IDE into the output in the console

New cards
10

what kind of programming language is Java

a compiler and interpreter

New cards
11

primitive types

most basic data structure in Java

determines size and type of information

New cards
12

types of primitive types

  • int

  • boolean

  • char

  • double

  • float

  • byte

New cards
13

string literal

an exact sequence of characters enclosed in “ “

  • not a primitive type

New cards
14

int

represents an integer with up to 2 bil places

New cards
15

boolean

true/false

1 bit; smallest value

New cards
16

double

decimal value up to 15 places

64 bits

New cards
17

float

decimal value up to 6 places

New cards
18

char

character

*c*

New cards
19

syntax/compiler errors

identified when program is compiled

New cards
20

exception/runtime error

occurs while program is running → program terminates abnormally

New cards
21

logic errors

detected after program is run

actual output =/= anticipated output

New cards
22

differences between primitive and non-primitive types

  1. primitive types already exist in Java; non-primitive is hand-made

  2. non-primitive can use methods to perform actions, primitive can’t

New cards
23

variable

a name given to a memory location that holds a specific type of value

New cards
24

type

set of values (a domain) and a set of operations on them

New cards
25

constant/final var

cannot be changed once given a value

New cards
26

compound assignment operators

  • used in place of “=”

  • adds a value onto the stated variable

x += 7;

7 will be added onto x

New cards
27

increment/decrement operators

  • ++ adds 1 to the value of a variable/array element

  • - - subtracts 1

New cards
28

Java is __ oriented

object

New cards
29

object-oriented

organizes software design around data and objects, not functions and logic (i.e. python)

New cards
30

interpreter

translates code line by line

New cards

Explore top notes

note Note
studied byStudied by 115 people
... ago
5.0(3)
note Note
studied byStudied by 82 people
... ago
5.0(1)
note Note
studied byStudied by 5 people
... ago
5.0(1)
note Note
studied byStudied by 1 person
... ago
5.0(1)
note Note
studied byStudied by 8 people
... ago
5.0(1)
note Note
studied byStudied by 1 person
... ago
5.0(1)
note Note
studied byStudied by 38 people
... ago
5.0(2)

Explore top flashcards

flashcards Flashcard (46)
studied byStudied by 19 people
... ago
5.0(1)
flashcards Flashcard (142)
studied byStudied by 22 people
... ago
5.0(1)
flashcards Flashcard (31)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (45)
studied byStudied by 1 person
... ago
5.0(1)
flashcards Flashcard (24)
studied byStudied by 23 people
... ago
5.0(1)
flashcards Flashcard (44)
studied byStudied by 16 people
... ago
5.0(1)
flashcards Flashcard (53)
studied byStudied by 6 people
... ago
4.0(1)
flashcards Flashcard (45)
studied byStudied by 48 people
... ago
5.0(3)
robot