AP Computer Science A - Quiz 1 Variables and Data Types

AP Computer Science A - Quiz 1 Variables and Data Types

12th Grade

5 Qs

quiz-placeholder

Similar activities

Quiz - Quarter 4 (Oracle)

Quiz - Quarter 4 (Oracle)

12th Grade

10 Qs

Computer Security:Encryption

Computer Security:Encryption

10th Grade - University

10 Qs

Flowchart Sequence

Flowchart Sequence

12th Grade

10 Qs

Embed System#2

Embed System#2

10th - 12th Grade

10 Qs

Quiz 7 (11.08.2021)

Quiz 7 (11.08.2021)

1st - 12th Grade

10 Qs

Tin 8/1

Tin 8/1

KG - University

10 Qs

ZOOM QUIZ

ZOOM QUIZ

1st - 12th Grade

10 Qs

Chapter 6 Part 2 - 4

Chapter 6 Part 2 - 4

11th - 12th Grade

11 Qs

AP Computer Science A - Quiz 1 Variables and Data Types

AP Computer Science A - Quiz 1 Variables and Data Types

Assessment

Interactive Video

Computers

12th Grade

Practice Problem

Hard

Created by

Christopher Dunn

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to declare a string variable in Java?

string var = "This is a string";

string var = 'This is a string';

String var = 'This is a string';

String var = "This is a string";

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct declaration of an integer variable?

int num1 = 10.5;

int num1 = 10;

boolean num1 = 10;

double num1 = 10;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a double variable with a value of 11?

double num1 = 11;

double num1 = 11.0;

int num1 = 11.0;

boolean num1 = 11.0;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'final' keyword do when declaring a variable?

It allows the variable to be changed later.

It makes the variable accessible only within the class.

It makes the variable a global variable.

It prevents the variable from being reassigned.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid boolean declaration?

boolean isTrue = 'true';

boolean isTrue = TRUE;

boolean isTrue = True;

boolean isTrue = true;

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?