Imports System
Imports System.IO
Class CSharpToJava
Private Shared Sub Main(ByVal args As String())
Dim line As String
Dim name As String
If args.Length < 1 Then
name = Console.ReadLine()
Else
name = args(0)
End If
Dim iFile As StreamReader = File.OpenText(name)
Dim oFile As StreamWriter = File.CreateText(name & ".java")
Do
line = iFile.ReadLine()
If line IsNot Nothing Then
line = line.Replace("bool ", "boolean ")
line = line.Replace("string ", "String ")
line = line.Replace("Console.WriteLine", "System.out.println")
oFile.WriteLine(line)
End If
Loop While line IsNot Nothing
iFile.Close()
oFile.Close()
End Sub
End Class