Multiple Choice Question

Quiz Guidelines

 

QID: 
481
Question: 

Consider the following code:

public class TestClass {
    //define tester method here
    public static void main(String[] args) throws Exception {
        TestClass tc = new TestClass();
        while(tc.tester()){
            System.out.println("running...");
        }
    }
}

Which of the following options would be a valid implementation of tester() method?

Select 2 options

A.   public boolean tester(){
        return false;
    } 
B.    public Boolean tester(){
        return false;
    } 
C.     public tester(){
        return false;
    } 
D.    public int tester(){
        return 0;
    }
E.   public String tester(){
        return "false";   
    }    

Q&A Set: 

Search the Web

Custom Search

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