Skip to content

Commit

Permalink
Merge pull request tarunsinghofficial#1825 from Kalashkalwani/main
Browse files Browse the repository at this point in the history
Code of Association in Java
  • Loading branch information
tarunsinghofficial authored Oct 20, 2021
2 parents 0286b6c + cc16371 commit 819560c
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Java_Programs_for_beginners/Association.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
class bank
{
public String name;
bank(String name)
{
this.name=name;
}
public String getbankname()
{
return this.name;
}
}

class employee
{
private String name;

employee(String name)
{
this.name=name;
}

public String getemployeename()
{
return this.name;
}
}

class Association
{
public static void main(String args[])
{
bank Bank=new bank("AXIS BANK");
employee emp=new employee("NEHA");

System.out.println(emp.getemployeename()+" is employee of "+Bank.getbankname());
}
}

0 comments on commit 819560c

Please sign in to comment.