Email address:
SCJP/OCPJP 1.6 certification
Practice Exams and Training
SCJP Online Training » Discussions

Your answers: G Wrong?

In the JDK 7 release, you can use a String object in the expression of a switch statement.

public class Count{

public static void main(String args[]){

String s="sri";


case "SRI": System.out.print("SRI LANKA ");

case "Sri": System.out.print("Sri Lanka ");

case "sri": System.out.print("sri lanka ");

case "sRI": System.out.print("sRI lANKA ");

default: System.out.print("");




sri lanka sRI lANKA -

G -answers correct!!! no H

ExamLab © 2008 - 2024