edited by
375 views
1 votes
1 votes

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";
    }
}
  1. dogood : dogoodgood
  2. dogood : gooddogood
  3. dogood : dodogood
  4. dogood : dogood
edited by

1 Answer

Answer:

Related questions

1 votes
1 votes
3 answers
1
Arjun asked Nov 5, 2017
837 views
Which of the following routing technique / techniques is/are used in distributed systems?Fixed RoutingVirtual RoutingDynamic Routing(a) only(a) and (b) only(c) onlyAll (a...
1 votes
1 votes
2 answers
3
Arjun asked Nov 5, 2017
909 views
The Sigmoid activation function $f(t)$ is defined as$\dfrac{1}{\text{exp} (t) + \text{exp} (-t)}$$t \text{ exp}(-t)$$\dfrac{1}{1+ \text{exp} (t)}$$\dfrac{1}{1+ \text{exp...