Multiple Choice Question

Quiz Guidelines

 

QID: 
529
Question: 

Given the class

// Filename: Test.java 

public class Test{   
public static void main(String args[]){      
for(int i = 0; i< args.length; i++){         
System.out.print("  "+args[i]);      }   } } 

Now consider the following 3 options for running the program:

a: java Test 
b: java Test param1 
c: java Test param1 param2 

Which of the following statements are true?

Select 2 options 

A. The program will throw java.lang.ArrayIndexOutofBoundsException on option a. 
B. The program will throw java.lang.NullPointerException on option a. 
C. The program will print Test param1 on option b. 
D. It will print param1 param2 on option c. 
E. It will not print anything on option a.

Q&A Set: 

Search the Web

Custom Search

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