Home > Net >  Which eldest brother to help write the code
Which eldest brother to help write the code

Time:10-08

I don't understand to solve my good food... Cry cry cry cry

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 IList Customers=new List (a);

Public void AddCustomer (Customer Customer)
{
Customers. The Add (the customer);
}

Public IList ShowCustomers ()
{
Return customers.
}
}




Is no difference on the c # and Java,

CodePudding user response:

https://www.cnblogs.com/xhnxhnu/p/9119617.html


Java syntax such as links,
  •  Tags:  
  • C#
  • Related