title: Android Studio: Java- making a global variable
body: <p>How do you make a variable that can be used across the application. For example, in Swift, you can name it by:</p>
  
  <pre><code>    var formattedPrice: String = rowData["date"] as String
      defaults.setObject(rowData, forKey: "rowData") 
  </code></pre>
  
  <p>and you can fetch it with: </p>
  
  <pre><code>    var variable = defaults.dictionaryForKey("rowData") as? NSDictionary
  </code></pre>
  
  <p>How can this behavior be mimicked in android studio? </p>