Skip to content

Commit 5959e8a

Browse files
authoredJun 25, 2020
Merge pull request #10 from omarbelkady/alan
Alan
2 parents f9eeb0e + 6152f07 commit 5959e8a

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed
 

‎Constructors/Cat.java

-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@ public void eat(int x)
3737
}
3838

3939

40-
Say if I use the protected keyword what happens say to the protected String name. Well, only items within the same package or are sub classes of the class will be able to access this variable name. Therefore, in our case, Main and Cat will be the only ones able to use the function. However, say I create a 2nd package this package will not be able to see this.

‎EqualsAndHashcode/User.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ public String output(boolean nice)
3232
{
3333
if(nice)
3434
{
35-
return "You\'re an awesome person"+ " " + getFullName() + ".";
35+
return "You're an awesome person"+ " " + getFullName() + ".";
3636

3737
}
38-
return "You\'re an idiot"+ " " + getFullName() + ".";
38+
return "You're an idiot"+ " " + getFullName() + ".";
3939
}
4040

4141
public String getFirstName()
@@ -47,7 +47,7 @@ public String getFirstName()
4747
public void setFirstName(String fN)
4848
{
4949
//Assigning the fName value we pass in to the field firstName
50-
fN=firstName;
50+
fN = firstName;
5151
//the .trim at the end will raise a null pointer exception because
5252
//it doesn't know what are we referencing
5353
//the .strip remove any whitespaces before output.

‎commit.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
git pull origin master
3+
git add .
4+
git commit -m "$*"
5+
git push origin alan

0 commit comments

Comments
 (0)
Please sign in to comment.