Nov2017 cs Q42

0. What is the output of the following JAVA program ?
Class Test {
  public static void main(String[] args) {
   Test obj = new Test();
   obj.start();
}
void start() {
  String stra = ”do”;
   String strb = method(stra);
  System.out.print(“: ”+stra + strb);
}
String method(String stra) {
   stra = stra + ”good”;
   System.out.print(stra);
   return“ good”;
  }
}

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *