Imports System
Public Class GetTheSecondWordOfString_VB_NET
Public Shared Sub Main()
Dim str As String = "c java c# python c++ vb.net rust"
Dim words As String() = str.Split(" "c)
If words.Length > 1 Then
Dim secondWord As String = words(1)
Console.WriteLine("The second word is: " & secondWord)
Else
Console.WriteLine("The input string does not contain enough words.")
End If
End Sub
End Class
' run:
'
' The second word is: java
'