Dim str as StringDim msg as StringIf str.toUpper="VISUAL BASIC" msg="VB.Net"Else msg="Not Visual Basic"EndIf
Dim str as StringDim msg as StringIf str.toUpper="IK" msg="Hi"Else msg="Bye"EndIf
grade=grade.Text.ToUpperIf grade=="A" Msg ="Excellent"ElseIf grade=="B" Msg="Very Good"ElseIf grade=="C" Msg="Good"ElseIf grade=="D" Msg="Fair"Else Msg="Fail"EndIf
If grade=="A" Msg ="Excellent"ElseIf grade=="B" Msg="Very Good"ElseIf grade=="C" Msg="Good"ElseIf grade=="D" Msg="Fair"Else Msg="Fail"EndIf
If 3>6 AndAlso 7>4 then Msg="Hi"Else Msg="Bye"EndIf
If 5*3 OrElse 3^2 Then Msg="Hi"Else Msg="Bye"EndIf
#include <stdio.h>int main(){ char *str = "This" //Line 1 char *ptr = "Program\n"; //Line 2 str = ptr; //Line 3 printf("%s, %s\n", str, ptr); //Line 4}
Dim strVB() As String = {"Sanfoundry", "Visual Basic", "VB.Net", "Visual Studio"}Dim len As Integerlen = strVB.Length()
void main(){ char *msg = "hi"; printf(msg);}
Router# show frame-relay ?
dlci
neighbors
lmi
pvc
map
try { String str = null; System.out.println(str.length());} catch (NullPointerException e) { System.out.println("NullPointerException!");} catch (Exception e) { System.out.println("Exception!");}