AP Computer Science A Unit 1

studied byStudied by 29 people
0.0(0)
get a hint
hint

skeleton code

1 / 21

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 22 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 4 people
Updated ... ago
4.0 Stars(1)
note Note
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 12 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 13 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 1 person
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 126 people
Updated ... ago
5.0 Stars(1)

Explore top flashcards

flashcards Flashcard42 terms
studied byStudied by 12 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard39 terms
studied byStudied by 24 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard131 terms
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard42 terms
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard45 terms
studied byStudied by 15 people
Updated ... ago
4.5 Stars(2)
flashcards Flashcard132 terms
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard164 terms
studied byStudied by 40 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard38 terms
studied byStudied by 1787 people
Updated ... ago
4.5 Stars(26)