r/java • u/daviddel • 21d ago
A Valhalla Ticker in One int
https://inside.java/2026/11/09/inside-java-ticker-value-class/A ticker symbol is an abbreviation that uniquely identifies a financial product such as a publicly traded share. Well-known ticker symbols are "ORCL" and "GOOGL". In this article, we will devise a Valhalla value class that can represent a ticker symbol using only a single int field.
41
Upvotes
View all comments
Show parent comment
0
u/TheStrangeDarkOne 21d ago
I think for the purposes of this demo you could have simply had a class with 5 chars since the complexity of the implementation drowns out anything in relation to values.