AP Computer Science A Unit 1

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

skeleton code

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 56 people
... ago
4.5(2)
note Note
studied byStudied by 18 people
... ago
5.0(1)
note Note
studied byStudied by 26 people
... ago
5.0(1)
note Note
studied byStudied by 24 people
... ago
5.0(1)
note Note
studied byStudied by 7 people
... ago
5.0(1)
note Note
studied byStudied by 22 people
... ago
5.0(1)
note Note
studied byStudied by 5 people
... ago
5.0(1)
note Note
studied byStudied by 2066 people
... ago
4.6(5)

Explore top flashcards

flashcards Flashcard (38)
studied byStudied by 52 people
... ago
5.0(1)
flashcards Flashcard (38)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (65)
studied byStudied by 1 person
... ago
5.0(1)
flashcards Flashcard (799)
studied byStudied by 10 people
... ago
5.0(2)
flashcards Flashcard (78)
studied byStudied by 5 people
... ago
5.0(1)
flashcards Flashcard (35)
studied byStudied by 21 people
... ago
5.0(1)
flashcards Flashcard (53)
studied byStudied by 2 people
... ago
4.0(1)
flashcards Flashcard (43)
studied byStudied by 5 people
... ago
5.0(1)
robot