title: boolean assign inside a method to a local variable or not?
body: <ol>
  <li><p>It is not quite clear for me, how we use boolean inside a method and how to set it false. Usually if you use a variable inside a method, you assign it to a local variable, do you do the same for booleans or just use and change them. </p></li>
  <li><p>why do we assign a local variable for an attribute by the way? what happens if we don't?</p></li>
  <li><p>How to use a setter for a boolean?</p></li>
  <li><p>How can I reduce now the size of the arraylist after someone borrows a book?</p></li>
  </ol>
  
  
  
  <pre><code>    public class Governance{
                      ArrayList&lt;Intenger&gt; Books=new ArrayList&lt;Integer&gt;(10);
                      private boolean active = true;
  
  
              public void borrowBook{
   /** does I assign active to a local variable? why do we assign attributes  
   to a local variable? what happens if we  dont?why I cant just use and 
   initialize (e.g. set a value) the  attribute as a I defined(best practices)**//
      boolean checkStatus = isActive(); //correct?
  
              if(Books.isEmpty()){
              //how to I set active to false (best practices)
              checkStatus = myFunction(); //correct or are there better ways to do it?
              }
                  else if(!Books.isEmpty() &amp;&amp; isActive){
                      System.out.println("You can borrow that book");
  
                  else{
                  System.out.println("You can not borrow that book");
                  }
  
  
           }
  
              public static boolean myFunction(){
                  return false;
              }
  
              public boolean isActive() {
                  return active;
              }
  
              //what is a case where I use this and how?
              public void setActive(boolean active) {
              this.active = active;
              }
  
          }
  </code></pre>