Git Cheatsheet

I learn git from this interactive tutorial. I take note along the way while I was doing it. Learn git visual Commit to repo We was on C1 commit git commit Branch new branch git branch <name> change branch git checkout <name> create a new branch and check it out It can be shorthand: git checkout -b <name> merge Now we are working on main branch We are going to merge the branch bugFix into main...

June 27, 2022 · 5 min · Derry

Java - static Keyword

static In simple words: static means the variable or methods that assigned to are belonging to the class, not the object. Therefore, there’s only one copy of the variable/method in the memory. When create an object where all instance variables aren’t static, every object will own its memory space, and its own copy of value. Suppose we have a ball class: class Ball{ double radius; final double PI = 3.14159; } We create 2 Ball objects, each Ball object will have its own instance variables in the memory...

April 18, 2022 · 5 min · Derry