Created
December 5, 2021 12:32
-
-
Save SirmaXX/4b2a6adc486f02a171a2d6049aeff183 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Friends { | |
private String Name; | |
private Friends next; | |
} | |
public class Person extends Friends { | |
private String Name; | |
private Integer HitCount; | |
public Friend FriendList; | |
public Person(String n) { | |
Name = n; | |
HitCount = 1; | |
FriendList = null; | |
} | |
public void ContentOut() { | |
System.out.println("Name :" + Name); | |
System.out.println("Hitcount"); | |
} | |
public void SetName(String nName) { | |
Name = nName; | |
} | |
public void IncreaseHit() { | |
HitCount++; | |
} | |
public String GetName() { | |
return Name; | |
} | |
public Integer GetHitCount() { | |
return HitCount; | |
} | |
} | |
class BicycleDemo { | |
public static void main(String[] args) { | |
Person deniz =new Person(); | |
deniz.ContentOut(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment