[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

JAVA Programming :: Basic Concepts - Discussion

Home > JAVA Programming > Basic Concepts > MCQs Questions Discussion

59 / 64

What will be the output of the below program:

public class SwitchTest {
public static void main(String argv[]) {
SwitchTest ms=new SwitchTest();
ms.display();
}
public void display() {
        int k=10;
        switch(k){
            
            default:
            System.out.println("This is the default output");
            break;
            case 10:
            System.out.println("ten");
            break;
            case 20:
            System.out.println("twenty");
            break;
        }
    }
}

Aten

BThis is the default output

Ctwenty

DNone

Answer: Option (Login/Signup)

Show Explanation

Asked In ::

Post Your Answer Here:     

No Discussion on this question yet!