How does 'Stock stock = new Stock(“HR.S”)' lead to an output?

How does 'Stock stock = new Stock(“HR.S”)' lead to an output?

I'm extremely new to Java, and I'm trying to understand why an output of the main method of the Magic class for this code is "TT". Our professor said we don't have to understand the meaning of this method, but just answer the output.

I'm extremely new to Java, and I'm trying to understand why an output of the main method of the Magic class for this code is "TT". Our professor said we don't have to understand the meaning of this method, but just answer the output.

The code is this.

public class Magic
{
    public static void main(String[] args)
    {
        final String MSG = "Good Restaurant Seattle";
        Stock stock = new Stock("HR.S");
        double price = stock.getPrice();
        int cent = (int) Math.rint(price);
        System.out.println(MSG.substring(cent, cent+2).toUpperCase());
    }
}

I understand where it took the letters from and how all variables such as cent and price are connected, but I don't understand what "HR.S" is and how it's connected to the output.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Java Fundamentals: Learn Java for absolute beginners |Simpliv

Java Fundamentals: Learn Java for absolute beginners

Java Essentials : Learn Core Java From Basic to Advance

Learn Java Programming Using Practical Assignments. Start Building Back-end Web Applications Robust Test Automation Frameworks By End Of The Course. Learn More!

Fundamentos de Java: Aprende Java desde cero, sin misterios | Simpliv

Fundamentos de Java: Aprende Java desde cero, sin misterios