1.

How Do You Print The Value Of Field ‘i’ Of Interface ‘onetwothree’ In The Below Example And What Will Be The It’s Value? Interface One { Int I = 222; Interface Onetwo { Int I = One.i+one.i; Interface Onetwothree { Int I = Onetwo.i + Onetwo.i; } } }

Answer»

PRINTING ‘i’ VALUE —> System.out.println(One.OneTwo.OneTwoThree.i)

Value of One.OneTwo.OneTwoThree.i will be 888.

Printing ‘i’ value —> System.out.println(One.OneTwo.OneTwoThree.i)

Value of One.OneTwo.OneTwoThree.i will be 888.



Discussion

No Comment Found

Related InterviewSolutions