Java & Netbeans: Display Result with Deferent Condition using SWITCH function

The code below is use to display deferent result with deferent condition using the Switch function in Java with Netbeans.

switch (status.getText()){
    case "Gwapo":
        textfield_result.setText("Marjohn Bebeloni");
        break;
    case "Pangit":
        textfield_result.setText("Ikaw");
        break;
}

 

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz