Multiple Choice Question

Quiz Guidelines

 

QID: 
469
Question: 

Given:

public class TestClass{
public static int getSwitch(String str){
return (int) Math.round( Double.parseDouble(str.substring(1, str.length()-}
public static void main(String args []){
switch(getSwitch(args[0])){
case 0 : System.out.print("Hello ");
case 1 : System.out.print("World"); break;
default : System.out.print(" Good Bye");
}
}   }

What will be printed by the above code if it is run with command line:      java TestClass --0.50
(There are two minuses before 0.)

Select 1 option

A. Hello
B. World
C. Hello World
D. Hello World Good Bye
E. Good Bye

Q&A Set: 

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!