AP Computer Science - Java Programming CH 7 Quiz and Solutions
Java Programming CH 7 Quiz
True/False:
____ 1. To initialize a new array we can use: int[] list = new int[4];
____ 2. A single array variable can reference a large set of data.
____ 3. int[] list = new int[4] has elements list[1], list[2], list[3], list[4].
____ 4. Double [] myList = {2.0, 4.5, -6.3}; myList.add(3.5,2); // New array {2.0, 4.5, 3.5, -6.3}
____ 5. myList[i] - -; is equivalent to myList[i] = myList[i] – 1;
____ 6. You can print a list using System.out.print(myList);
____ 7. char[][] charArray = new char[3][5] makes an array with 3 columns and 5 rows.
____ 8. A for loop can contain a colon in it (:) to loop through rows.
____ 9. In the array below mat[2] = {1, 6, 3, 4}
1 7 -8 9
1 6 3 4
3 -5 7 2
____ 10. String[][] strs = new String[2][5] could look like this:
“Hello” “Nope” “Hello” “Nope” “Goodbye”
“Goodbye” “Nope” “Hello” “Goodbye” “Hansen”
Short Answer
Short Answer:
- What does this section of code do?
- If I were to enter the numbers 4 3 2.5 -6, what would the code above print?
Solutions
- True
- True
- False
- False
- True
- False
- False
- True
- False
- True
- It takes an array of length 4 from the user and prints it.
- 4.0 3.0 2.5 -6.0 // They all have a decimal point because they are doubles (Rational numbers).
All SteemitEducation Posts
Physics
Kinematics Video, Circular Motion Video, Forces in 1 & 2 Dimensions Videos, Kinematics Full Lesson, Circular Motion and Gravitation Full Lesson, Kinematics and Forces Quiz, Forces in 1-Dimension, Forces in 2-Dimensions, Basic Physics, Kinematics, and Forces Review, AP Physics Midterm Exam, AP Physics Midterm Exam Solutions
Computer Science
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17
SAT
Asymptotes, Composite Functions, Contest 1 - Area, Contest 1 – Winners and Solution, PEMDAS, Systems of Equations, Functions, Exponents, Contest 2 - More Functions, Contest 2 – Winners and Solution, Percents, The Interest Equation, All About Division, Contest 3 - Factoring, Contest 3 – Winners and Solution, Fractional and Negative Exponents, Basic Trig, Contest 4 - Math Vocab, Contest - 5, Contest 5 – Winners and Solution, Contest 6, Contest 6 – Winners and Solution
General Math
Basics of Algebra, Trigonometry Video, Proof of Quadratic Formula, Factoring Video, Unions and Intersections, Surface Area of a Cylinder, Substitution Video, Combinatorics Basics
Graphing from Algebra to Calculus
Algebra 1, Algebra 2, Pre-Calculus, Calculus
Piloting Airplanes
Introduction, Preflight, Requirements, Instruments, Take-Offs and Landings, Why a Plane Can Fly, Reading the Runway, Maneuvers
Other
Engineering (Isometric) Drawing, Pressure & SCUBA Diving
Leave AP Computer Science - Java Programming CH 7 Quiz and Solutions to:
Read more #tutorials posts
Best Posts From Hansenator
We have not curated any of hansenator's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Hansenator
- Hansenator in New Orleans - Li'l Dizzy's Cafe & First Walk
- 1000 Followers, A New Logo, and The Crypto!
- AP Computer Science - Methods and Loops Quiz
- AP Physics with Hansenator - Momentum Lesson
- AP Computer Science - The Armstrong Numbers
- AP Physics with Hansenator - Another Kinematics and Energy Quiz
- AP Physics with Hansenator - Kinematics and Forces Quiz & Solutions
- AP Computer Science - Java Programming CH 7 Quiz and Solutions
- AP Computer Science - More Nested Loop Practice and Solutions
- Travel with Hansenator - New York and Vermont (5 - Grand Central Station & Staten Island Ferry)