although getWorkbook is static, so accordingly, this code should have worked. But here, using the reference before its declaration or in the same statement as declaration is causing error "Forward referencing i.e. using reference before declaration".