面向对象-基础篇
前言:
- 引出类与对象(oop) — 为什么需要类与对象(oop)
- 例:我有两只小狗,有姓名,年龄,性别,怎么完成该操作?
//用变量 String DogName = "小白"; int DogAge = 6; char DogSex= "公" String DogName = "小新"; int DogAge = 6; char DogSex= "公" //用数组 String[] Dog = {"小白","6","公"}; //数字类型不明确 String[] Dog = {"小新","6","公"}; //数字类型不明确