Telegram Group 🔥🔥🔥
Get answers in minutes
Questions answered :
48
/50
Answer verified
What will be the output of the program
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 */
🗓 Apr 3, 2022
-
-
-
-
votes
Ojasvini
🌐 India
Thank you so much for the answer
votes
Kathryn
🌐 India
hmm, where is the explanation
Was your question answered?
Thanks for the feedback! ✅
Want to get famous? 📸
Answer question and get 🤩 high-lighted on our homepage.