AP Computer Science A Unit 1

studied byStudied by 30 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 21

flashcard set

Earn XP

22 Terms

1
skeleton code
the basic starting point of a program
New cards
2
\\”
What is the escape sequence for “
New cards
3
\\\\
What is the escape sequence for \\
New cards
4
backslash
What is this “\\”
New cards
5
forward slash
What is this “/”
New cards
6
\\t
What escape sequence performs a tab
New cards
7
\\n
What escape sequence moves the cursor to the next line
New cards
8
System.out.println();
Which print command prints the supplied text and moves the cursor to the beginning of the next line
New cards
9
System.out.print();
Which print command prints the text without going to the next line?\`
New cards
10
/\*
What symbol starts a multi-line comment
New cards
11
//
What symbol is used for a single line comment
New cards
12
\*/
What symbol ends a multi-line comment
New cards
13
Comment
A(n) BLANK is a section of code that is ignored by the compiler
New cards
14
public static void main(String[] args)

What does skeleton code look like?

New cards
15
Public class Examples
{
public static void main(String[] args)
{
System.out.println("bobo");
}
}

// What does the code print?

bobo

New cards
16
Public class Examples
{
public static void main(String[] args)
{
//System.out.println("bobo");
}
}

// what is the result of executing this code?

nothing will print

New cards
17
Public class Examples
{
public static void main(String[] args)
{
System.out.println(:P);
}
}
// what type of error does this produce

Syntax error

New cards
18
Public class Examples
{
public static void main(String[] args)
{
System.out.print("bobo\neats\ndc");
}
}
// what does this code execute?

bobo

eats

dc

New cards
19

int count = 57;

how do you declare an integer value named count with the value of 57?

New cards
20

double gpa = 3.9;

how do you declare a decimal value named gpa that holds a students gpa?

New cards
21

String name = “John Harvard”;

how do you create an object called name that holds a students' name?

New cards
22

count = count + 2;

OR

count+=2;

how do you change the value of an int named count up by 2?

New cards

Explore top notes

note Note
studied byStudied by 29 people
666 days ago
5.0(1)
note Note
studied byStudied by 25 people
544 days ago
5.0(1)
note Note
studied byStudied by 3 people
82 days ago
5.0(1)
note Note
studied byStudied by 235 people
698 days ago
5.0(3)
note Note
studied byStudied by 32 people
131 days ago
5.0(1)
note Note
studied byStudied by 85 people
308 days ago
5.0(1)
note Note
studied byStudied by 1958 people
694 days ago
4.9(7)

Explore top flashcards

flashcards Flashcard (38)
studied byStudied by 3 people
283 days ago
5.0(1)
flashcards Flashcard (60)
studied byStudied by 18 people
531 days ago
5.0(1)
flashcards Flashcard (65)
studied byStudied by 27 people
686 days ago
5.0(1)
flashcards Flashcard (31)
studied byStudied by 8 people
80 days ago
5.0(1)
flashcards Flashcard (37)
studied byStudied by 252 people
446 days ago
5.0(2)
flashcards Flashcard (23)
studied byStudied by 3 people
504 days ago
5.0(1)
flashcards Flashcard (38)
studied byStudied by 6 people
357 days ago
5.0(1)
flashcards Flashcard (25)
studied byStudied by 112 people
706 days ago
5.0(8)
robot