Skip Top Navigation Bar
Why Java?
Learner's Corner
Teacher's Corner
Java Playground
Home
Getting Setup
Learn
Practice
Apply
Other Resources
Evaluate Code Segments with One-dimensional Array Creation and Access
Evaluating Expressions
Grab a Piece of Paper!
Evaluate each expression.
Verify your answer by running the code in the Java Playground.
Introduction to Array Tutorial
Practice 1: Price List
Trace the provide code segment and predict the output.
Verify your prediction is correct by running the code in the Java Playground.
Modify the code segment to access the price 1.99 and print it to the screen. Run the code to test.
Practice 2: Temperatures
Trace the provide code segment and predict the output.
Verify your prediction is correct by running the code in the Java Playground.
Practice 3: Book Sales
Trace the provide code segment and predict the output.
Verify your prediction is correct by running the code in the Java Playground.
Practice 4: Gift Giving
Trace the provide code segment and predict the output.
Verify your prediction is correct by running the code in the Java Playground.
Modify the code to add the gift "Pen" to the last element of the array. Add this line before the output statement.
Practice 5: Test Scores
Trace the provide code segment and predict the output.
Verify your prediction is correct by running the code in the Java Playground.