Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create aggregate.java #246

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions aggregate.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import java.util.Scanner;
class add{
String a,b,c;
add(String a,String b,String c)
{
this.a=a;
this.b=b;
this.c=c;

}
}
class emp{
int id,f;

add a1;
emp(int id,int f,add a1)
{
this.id=id;
this.f=f;
this.a1=a1;


}
void display()
{
System.out.println(a1.a+" "+ id+" "+f);
}
}
class aggre2{
public static void main(String args[])
{
add a1=new add("a","bdc","cty");
add a2=new add("x","yty","zyu");
emp e1=new emp(1,2,a1);
emp e2=new emp(9,9,a2);
e1.display();
e2.display();
}
}