Created
February 4, 2026 12:41
-
-
Save trycf/d83bf3f539840eafc4d24adde783458a to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfjava handle = "instance"> | |
| public class car{ | |
| public String model; | |
| public int year; | |
| public car(String carModel, int carYear){ | |
| this.model = carModel; | |
| this.year = carYear; | |
| } | |
| public String getCarModel(){ | |
| return "Araba Modeli: " + model; | |
| } | |
| public int getCarYear(){ | |
| return "Araba yılı: " + year; | |
| } | |
| } | |
| </cfjava> | |
| <cfset instance.init("corolla", "2012")> | |
| <cfset carModel = instance.getCarModel()> | |
| <cfset carYear = instance.getCarYear()> | |
| <cfoutput>#carModel#</cfoutput> | |
| <cfoutput>#carYear#</cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment