Sub FormatString(str1 As String, str2 As String, strformat As String) As String
'Create a Stringbuilder (it's much faster for appending strings)
Dim SB As StringBuilder
SB.Initialize
'Create the Formatter Object
Dim Format As JavaObject
Format.InitializeStatic("java.lang.String")
'Create an array of arrays that holds our data.
'We could have been read from a CSV file using StringUtils and converted to an array of arrays using Regex.Split
'NOTE: the array must be of type Object
Dim Data(1) As Object
Data(0) = Array As Object(str1, str2)
Dim FormatStr As String = strformat
For Each Line() As Object In Data
SB.Append(Format.RunMethod("format",Array As Object(FormatStr,Line)))
Next
Return SB.ToString
End Sub