title: How to add a new node and data programatically in a Firebase database and android studio
body: <p>I just can't seem to get the logic behind adding new nodes. I've tried every combination for a simple task, How do I add driver2 with a value of eight to the root note.</p>
  <p>I've tried a combination of push and set. I just don't seem to get it.</p>
  <p>What goes above this line?</p>
  <pre><code>newref.child(&quot;diver2&quot;).setValue(&quot;eight&quot;);
  </code></pre>
  <p><a href="https://i.stack.imgur.com/43HY4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/43HY4.png" alt="firebase" /></a></p>