KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Could anyone explain how Java executes this code? I mean the order of executing each statement. public class Foo { boolean flag = sFlag; static Foo foo = new Foo(); static boolean sFlag = true; public static void main(String[] args) { System.out.println(foo.flag); } } OUTPUT: false
Tags (comma-separated)
Save Edits
Cancel