Skip to content

Commit 805d274

Browse files
committed
This is a problem solution
1 parent acae9a7 commit 805d274

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

this-is-a-problem/NameMe.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
public class NameMe {
2+
public String firstName;
3+
public String lastName;
4+
public String fullName;
5+
6+
public NameMe(String first, String last) {
7+
this.firstName = first;
8+
this.lastName = last;
9+
this.fullName = first + " " + last;
10+
}
11+
12+
public String getFirstName() {
13+
return this.firstName;
14+
}
15+
16+
public String getLastName() {
17+
return this.lastName;
18+
}
19+
20+
public String getFullName() {
21+
return this.firstName + " " + this.lastName;
22+
}
23+
}

this-is-a-problem/NameMe.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function NameMe(first, last) {
2+
this.firstName = first;
3+
this.lastName = last;
4+
this.name = this.firstName + ' ' + this.lastName;
5+
}

0 commit comments

Comments
 (0)