CodePudding user response:
I for a long time didn't touch the Java/* *, * */you look at this right
Public class Customer {
String name {get name; The set name; };
{String age get age; The set age; };
{Boolean members get member; Member of the set; };
}
Public class CustomerBiz {
Public void addCustomer (Customer cust) {//specific implementation code}
Public void showCustomer (Customer cust) {//specific implementation code}
}
Public class TestCustomer {
The Customer cust=new Customer ();
//the implementation code
}
CodePudding user response:
CodePudding user response:
Public class Customer
{
///& lt; Summary>
///get or set the name
///& lt;/summary>
Public string RealName {get; The set; }
///& lt; Summary>
///get or set the age
///& lt;/summary>
Public int the Age {get; The set; }
///& lt; Summary>
///whether get or set the member
///& lt;/summary>
Public bool IsMember {get; The set; }
}
Public class CustomerBiz
{
Private IListCustomers=new List (a);
Public void AddCustomer (Customer Customer)
{
Customers. The Add (the customer);
}
Public IListShowCustomers ()
{
Return customers.
}
}
Is no difference on the c # and Java,
CodePudding user response:
https://www.cnblogs.com/xhnxhnu/p/9119617.htmlJava syntax such as links,