Coding with Java Language Essentials

Lab Steps

Connecting to the Java Web IDE
Exercise 1: Working with Arrays
Exercise 2: Working with Class Fields
Exercise 3: Using Language Statements
Exercise 4: Using Loops
Exercise 5: Manipulating Strings
Exercise 6: Fun with Strings
Exercise 7: Creating SubClasses

The hands-on lab is part of this learning path

Ready for the real environment experience?

This is a long-running lab that you can pause for up to 1 hour

You can pause this lab for
up to 1h
Time Limit2h


This lab provides you with exposure to arrays, fields, language statements, loops, string manipulation, and subclassing when developing with the Java programming language. You will be required to complete the following guided coding exercises:

  • Exercise 1 - Working with Arrays: Create and populate an array and then use a for loop to print out the elements of the array
  • Exercise 2 - Working with Class Fields: Declare and use private instance fields
  • Exercise 3 - Using Language Statements: Use if-else and switch language statements to implement custom control flows
  • Exercise 4 - Using Loops: Write a basic for loop that loops from 0 to less than 10
  • Exercise 5 - Manipulating Strings: Work with various string building techniques
  • Exercise 6 - Fun with Strings: Examine string equality testing
  • Exercise 7 - Creating Subclasses: Complete an inheritance design

Note: Each exercise comes with the fully completed solution code when required or assistance is needed.

Lab Objectives

Upon completion of this Lab, you will be able to:

  • Write Java code to create and populate arrays
  • Write Java classes with fields correctly initialized
  • Use if-else and switch statements to control program flow
  • Use for loops to perform repetition
  • Create and manipulate strings
  • Be able to implement subclassing
  • Run and debug the Java code and examine the results that are printed to the console

You should:

  • Be comfortable with using a browser-based IDE

Lab Environment

This lab will start with the following AWS resources provisioned automatically for you:

  • A single EC2 instance, named, which will have a public IP address attached. This instance will host a web-based Java IDE (based on the Visual Code editor).

To achieve the lab end state, you will be walked through the process of:

  • Using your local browser, access the web-based Java IDE served from the
  • Completing the 7 lab exercises:
    • Exercise 1 - Working with Arrays
    • Exercise 2 - Working with Class Fields
    • Exercise 3 - Using Language Statements
    • Exercise 4 - Using Loops
    • Exercise 5 - Manipulating Strings
    • Exercise 6 - Fun with Strings
    • Exercise 7 - Creating Subclasses


June 16th, 2018 - Optimized creation of lab resources to reduce the time it takes to access the browser IDE by 60%.

About the Author
Learning paths91

Jeremy is a Content Lead Architect and DevOps SME here at Cloud Academy where he specializes in developing DevOps technical training documentation.

He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 25+ years. In recent times, Jeremy has been focused on DevOps, Cloud (AWS, GCP, Azure), Security, Kubernetes, and Machine Learning.

Jeremy holds professional certifications for AWS, GCP, Terraform, Kubernetes (CKA, CKAD, CKS).