Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Java Illuminated
Quiz 2: Programming Building Blocks- Java Basics
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Question 41
Essay
Compare and contrast single-precision and double-precision floating-point data types.
Question 42
Short Answer
When you declare a variable, with an assignment operator (=) with the following syntax: dataType variableName = initialValue; How would you read the sentence?
Question 43
Essay
Would it be better to use doubles or floats for calculations to scale up recipes to feed three times as many people as the recipes are written to serve?
Question 44
Essay
What are three ways to add 1 to an int variable named number?
Question 45
Short Answer
Assuming number is an int variable, write a statement using a shortcut operator equivalent to this one: number = number * 5;
Question 46
Short Answer
Rewrite the following into one statement: int age; age = 32;
Question 47
Essay
You want to insert the comment "Java is better than ice cream." Identify two ways to include this comment in your code.
Question 48
Essay
What are some advantages of using variables?
Question 49
Essay
Compare the variable identifiers numberOfStudentsPassing and winners. Describe which would be preferable in a program that evaluates success of a teaching program.
Question 50
Essay
Sam wants to calculate whether his students simply passed or failed. He uses a char variable, because student grades are A through F. Is this the best data type to use? Why or why not?
Question 51
Essay
One way to specify an initial value for a variable (variable 1) is to assign the variable the value of another variable (variable 2). Explain why it is not valid to assign variable 1 as a double and variable 2 as a float.