hands-on lab

Coding with Java Language Basics

Beginner
Up to 1h 30m
2,928
4.4/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab description

This Lab introduces you to the basics of the Java programming language, requiring you to complete the following guided coding exercises:

  • Exercise 1 - SimpleClass: Complete the code required to instantiate a new Employee object, then update the Employee objects Name and Salary fields, and finally print out the state of the Employee object.
  • Exercise 2 - Methods: Update the Employee class, adding constructors, getter and setter methods

Note: Each exercise comes with the fully completed solution code for reference in times of need.

Lab Objectives

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

  • Write Java code that instantiates new objects
  • Write Java code that updates an object's fields, which changes the state of the object
  • 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 ide.java.platform.instance, 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 ide.java.platform.instance
  • Completing the 2 lab exercises:
    • Exercise 1 - SimpleClass
    • Exercise 2 - Methods

Updates

February 8th, 2024 - Updated maven build commands to reduce compile times

February 21st, 2023 - Updated labstep with current solution screenshot

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

About the author
Avatar
Jeremy Cook, opens in a new tab
Content Lead Architect
Students
160,752
Labs
82
Courses
106
Learning paths
214

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, Azure, GCP), Security, Kubernetes, and Machine Learning.

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

Lab steps
Connecting to the Java Web IDE
Exercise 1: SimpleClass
Exercise 2: Methods