logo

Crowdly

Browser

Add to Chrome

Що буде виведено у результаті виконання програми? public class Foo {     F...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Що буде виведено у результаті виконання програми?

public class Foo

{

    Foo()

    {

        System.out.print("foo");

    }

   

class Bar

{

    Bar()

    {

        System.out.print("bar");

    }

    public void go()

    {

        System.out.print("hi");

    }

} /* class Bar ends */

 

    public static void main (String [] args)

    {

        Foo f = new Foo();

        f.makeBar();

    }

    void makeBar()

    {

        (new Bar() {}).go();

    }

}/* class Foo ends */

0%
0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on vns.lpnu.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome