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 1065 people
... ago
4.0(4)
note Note
studied byStudied by 17 people
... ago
5.0(2)
note Note
studied byStudied by 33 people
... ago
5.0(3)
note Note
studied byStudied by 11 people
... ago
5.0(1)
note Note
studied byStudied by 69 people
... ago
5.0(2)
note Note
studied byStudied by 9 people
... ago
5.0(1)
note Note
studied byStudied by 5 people
... ago
5.0(1)
note Note
studied byStudied by 31 people
... ago
5.0(1)

Explore top flashcards

flashcards Flashcard (65)
studied byStudied by 17 people
... ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 25 people
... ago
5.0(2)
flashcards Flashcard (83)
studied byStudied by 3 people
... ago
5.0(1)
flashcards Flashcard (60)
studied byStudied by 13 people
... ago
5.0(2)
flashcards Flashcard (207)
studied byStudied by 714 people
... ago
4.2(9)
flashcards Flashcard (95)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (77)
studied byStudied by 35 people
... ago
5.0(2)
flashcards Flashcard (20)
studied byStudied by 1 person
... ago
5.0(1)
robot