Skip to content

Commit 8b7eb49

Browse files
committed
Small changes
Procrastination
1 parent 2f93f10 commit 8b7eb49

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

src/Git/Intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Git & GitHub
22

3-
Git is the industry standard system for code **version control**. It tracks changes to our code as we edit, permitting more complicated ways of saving and managing code. GitHub is a fancy GUI (graphical user interface) to access the tools of Git without needing CLI (command line interface), and stores code in the cloud. Using Git & GitHub, we can track everyone’s contributions from their device, see where mistakes or bugs may have occurred, and revert as necessary. You can think of this as a much more complicate version of the version control in Google Docs.
3+
Git is the industry standard system for code **version control**. It helps software developing teams manage changes to their source code over time. In other words, version control keeps track of every change in your code, and it allows you to go back in time when something goes wrong. It is really helpful to prevent work done at the same time from conflicting when multiple people are working on the same project. GitHub is a website that stores code in the cloud. Using Git & GitHub, we can track everyone’s contributions from their device, see where mistakes or bugs may have occurred, and revert as necessary. You can think of this as a much more complicated version of the version control in Google Docs.
44

55
> Don't worry we will help you out with this and it is much simpler than it looks, trust us!
66
@@ -9,6 +9,6 @@ Git is the industry standard system for code **version control**. It tracks chan
99
<img src="./GitHub-Text-Logo.png" alt="github text logo" height="100">
1010
</div>
1111

12-
Without GitHub, it is almost impossible to manage a large codebase effectively. Very few programmers can do that, but the best of us use version control systems to work together.
12+
Without Git, it is almost impossible to manage a large codebase effectively. We can use version control systems to work together.
1313

1414
> Fun fact: Git was developed Linus Torvalds (the creator of linux) to help with developing the Linux kernel after the version control system they were using fell short. Two decades later and virtually every developer uses Git!

src/Object-Oriented-Programming/course/Objects.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static type name() { [...] }
9595

9696
What does static mean?
9797

98-
The main difference between static and non-static methods is that static methods are associated with the class, and non-static methods are associated with the instance.
98+
The main difference between static and non-static methods is that static methods are associated with the class, and non-static methods are associated with the instance/object.
9999

100100
</div>
101101

@@ -104,8 +104,15 @@ That means that static methods can only access information that is *not* associa
104104
To access a static field (instance variable) or method, you need to use the **class name**, and the *dot operator*:
105105

106106
```java
107-
ClassName.methodName(); //This runs a static function that is created in the class
108-
ClassName.variableName; //This returns a static variable that is created in the class
107+
ClassName.staticMethodName(); //This runs a static function that is created in the class
108+
ClassName.staticVariableName; //This returns a static variable that is created in the class
109+
```
110+
111+
To access a regular non-static field or method, you need to use the **object variable's name** instead:
112+
113+
```java
114+
objectName.methodName();
115+
objectName.variableName;
109116
```
110117

111118
The dot operator is used to access things contained by the object or class. This can be a variable or a function. When what you are trying to access is static you use the class. When it is not you use an object of that class.
@@ -187,3 +194,4 @@ public boolean equals(Object obj) {
187194

188195
To compare two objects, you can implement `.compareTo()` in a similar way.
189196

197+
> This is because a variable that stores an object is just the memory location of that object!

src/Object-Oriented-Programming/course/Scope.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class Test {
1414
public int publicNum;
1515

1616
// In scope throughout the class, only in this class, instance variable
17-
private int num;
17+
private int num = 7;
1818

1919

2020
public void returnGreater(int num) {
@@ -23,12 +23,12 @@ public class Test {
2323

2424
if (this.num > num) { // The "this" keyword is used to access *instance variables* in the event of a conflict
2525

26-
//this.num is defined, instance var
26+
//this.num is the instance var
2727
return this.num;
2828

2929
} else if (num > this.num) {
3030

31-
//num is defined, method var
31+
//num is the method var
3232
return num;
3333

3434
}

0 commit comments

Comments
 (0)