Skip to content

Instantly share code, notes, and snippets.

@SirmaXX
Created December 5, 2021 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SirmaXX/4b2a6adc486f02a171a2d6049aeff183 to your computer and use it in GitHub Desktop.
Save SirmaXX/4b2a6adc486f02a171a2d6049aeff183 to your computer and use it in GitHub Desktop.
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