Eclipse writing in java basic program

Install eclipse application

Install eclipse and create a shortcut to open the application and put it on the D drive.
Insert picture description here
Create a Java project named project name
src and create a package named com.hg.dem02;
create two classes named Demo02PhoneTwo and Phone;
Insert picture description here
write the source code in the first class and The annotation
Insert picture description here
is mainly defined in the second class.
Define a class to simulate "mobile phone" things.
Corresponds to the category (attribute);
brand price color
member method (behavior);
call group text messaging
Insert picture description here

Save and run

Running results and overall
Insert picture description here
Insert picture description here
big data 2003 student number 2020080603020

Guess you like

Origin blog.csdn.net/weixin_55680204/article/details/115055365