Variables and their Data Types in JAVA

Flashcard
•
Computers
•
9th Grade
•
Hard
Wayground Content
FREE Resource
Student preview

8 questions
Show all answers
1.
FLASHCARD QUESTION
Front
How is a variable in programming different from a variable in math? Options: A. In programming, a variable is always a letter that represents an unknown value. B. In programming, a variable is a fixed number. C. In programming, a variable stores a value and has a name, and the value can change. D. There is no difference — they are the same in both math and programming.
Back
In programming, a variable stores a value and has a name, and the value can change.
2.
FLASHCARD QUESTION
Front
What is a variable and why do we use it in programming?
Back
A variable is a name used to store data in a program so it can be reused or changed.
3.
FLASHCARD QUESTION
Front
Match the following value to the correct Java data type: "Hello"
Back
string
4.
FLASHCARD QUESTION
Front
Match the value true to the correct Java data type.
Back
boolean
5.
FLASHCARD QUESTION
Front
Match the following value: 75.5
Back
double
6.
FLASHCARD QUESTION
Front
Match the following value to the correct Java data type: 25
Back
int
7.
FLASHCARD QUESTION
Front
Is this a valid variable name in Java? Why or why not? int 2hot = 100;
Back
No, because variable names can’t start with a digit.
8.
FLASHCARD QUESTION
Front
Which of the following is the correct way to declare a variable to store a student’s GPA (as a decimal)? A. int GPA = "3.7"; B. String GPA = 3.7; C. double GPA = 3.7; D. boolean GPA = "3.7f";
Back
double GPA = 3.7;
Similar Resources on Wayground
10 questions
Multi Step Equations with Fractions

Flashcard
•
9th - 10th Grade
10 questions
Python

Flashcard
•
7th - 8th Grade
9 questions
code.org unit 4

Flashcard
•
9th - 12th Grade
12 questions
Basics Python

Flashcard
•
8th - 10th Grade
10 questions
Programming Fundamentals Recap

Flashcard
•
8th Grade
5 questions
User Inputs JavaScript

Flashcard
•
10th Grade
8 questions
AP Computer Science Principles Unit 4 Review

Flashcard
•
9th - 12th Grade
10 questions
DGT Vocab

Flashcard
•
7th - 8th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
24 questions
Scientific method and variables review

Quiz
•
9th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
19 questions
Mental Health Vocabulary Pre-test

Quiz
•
9th Grade
14 questions
Points, Lines, Planes

Quiz
•
9th Grade