Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Started - iouState

Tags:

corda

I'm working through the R3 Corda helloworld tutorial which is located at this URL: https://docs.corda.net/hello-world-state.html

....and am using the latest version of IntellJ community.

The tutorial modifies the class name in TemplateState.kt from TemplateState() to IOUState(). Does the Kotlin source file need to be renamed from TemplateState.kt to IOUState.kt? The tutorial isn't clear on this.

like image 537
TonyBy Avatar asked Sep 05 '25 18:09

TonyBy


1 Answers

Kotlin sources files do not have to match the name of the class they contain. In fact you can have multiple class declarations in the same source file or even have a source file with no classes and only top level functions or values.

like image 77
Narthana Epa Avatar answered Sep 11 '25 04:09

Narthana Epa