title: Is it better to use local or global variables
body: <p>Is it better to use local or global variables?</p>
  
  <p>Let's say talking about 2000+ lines of android(java) service class, and all service is working on 'request' object and similar shared objects.</p>
  
  <p>If I make everything local(keep inside of function), I need to pass many variables every time, or override same function many times. I need to make sure that objects, and sub objects are not null too.</p>
  
  <p>If I make some variables global(across the class) I can share them, use them across the functions. Which I think will make everything easier.</p>
  
  <p>What are the good sides and bad sides of defining variables inside of function or defining globally. In practice, and in theory(readability etc).</p>
  
  <p>Is there suggested way?</p>
  
  <p>Thank you.</p>